Mercurial > octave
annotate libgui/src/main-window.h @ 19714:21015ca26566
Restructure shutdown flow and behavior for improved robustness
* file-editor-interface.h (file_editor_interface::check_closing): Remove
closing_state argument from input.
* file-editor-tab.cc (file_editor_tab::_cancelled): New static variable for
managing chain of file closes.
(file_editor_tab::file_editor_tab): Discard _app_closing and _modal_dialog
initializations.
(file_editor_tab::closeEvent): Upon accepting the close event, als request
tab removal.
(file_editor_tab::check_modified_file): New simple routine checking for
modified file if there hasn't been cancellation yet.
(file_editor_tab::run_file): Remove use of _modal_dialog.
(file_editor_tab::show_dialog): Add modal input setting. Remove use of
_app_closing and _modal_dialog.
(file_editor_tab::check_file_modified): Remove situational message for just
one. If modified, call show_dialog with modal true, return QMessageBox::Cancel
if anything cancelled, otherwise the user decision.
(file_editor_tab::handle_file_modified_answer): Do not remove file editor tab
in any case. If user cancelled, set _cancelled true.
(file_editor_tab::save_file): Add "false" (non-modal) to show_dialog() call.
(file_editor_tab::save_file_as): Add "false" (non-modal) to show_dialog() call.
(file_editor_tab::conditional_close): Remove input argument and use of variable
_app_closing.
* file-editor-tab.h (file_editor_tab::conditional_close): Remove input
argument.
(file_editor_tab::reset_cancel): New member function declaration for managing
cancellation of tab chain saves.
(file_editor_tab::was_cancel): New member function for indicating any
cancellation when saving modified files.
(file_editor_tab::check_modified_file): New slot declaration for checking and
saving file modifications.
(file_editor_tab::show_dialog): Add modal option input argument.
(file_editor_tab::_app_closing, file_editor_tab::_modal_dialog): Remove.
(file_editor_tab::_cancelled): Add.
* file-editor.cc (file_editor::file_editor): Remove _check_closing_done
initialization.
(file_editor::~file_editor): Remove use of _check_closing_done and
check_closing().
(file_editor::check_closing): Clear cancellation history and check all files
for modifications, without closing. Close all tabs and delete associated
widgets if no cancellation. Remove use of _check_closing_done.
(file_editor::request_close_file): Remove argument from conditional_close()
function call.
(file_editor::request_close_all_files): Ditto.
(file_editor::request_close_other_files): Ditto.
(file_editor::handle_tab_close_request): Ditto.
(file_editor::handle_tab_remove_request): Add comment about deleting sender.
(file_editor::add_file_editor_tab): Connect fetab_check_modified_file signal to
check_modified_file slot.
* file-editor.h (file_editor::fetab_check_modified_file): New signal.
(file_editor::check_closing): Remove input argument.
(file_editor::_check_closing_done): Remove.
* main-window.cc (main_window::confirm_shutdown_octave): Rename of member
function main_window::confirm_exit_octave(). Change return type to void. Set
octave/qt link confirmation result then awake worker process.
(main_window::exit_app): Rename of member function main_window::exit().
(main_window::closeEvent): Rather than post callback event, queue "exit" in
the command buffer.
(main_window::construct_octave_qt_link): Connect confirm_shutdown_signal to
confirm_shutdown_octave slot. Connect exit_app_signal to exit_app slot.
(main_window::exit_callback): Remove.
(main_window::confirm_exit_octave): Renamed as confirm_shutdown_octave().
* main-window.h (main_window::confirm_shutdown_octave): Rename of slot
confirm_exit_octave().
(main_window::exit): Renamed exit_app().
(main_window::exit_callback): Removed declaration.
(main_window::confirm_exit_octave): Renamed confirm_shutdown_octave().
* octave-qt-link.cc (octave_qt_link::do_confirm_shutdown): New virtual function
definition for initiating GUI shutdown and confirm exit. Worker process goes
into sleep mode after issuing cross-thread signal. Return confirmation result.
(octave_qt_link::do_exit): Change exit_signal to exit_app_signal.
octave-qt-link.h (octave_qt_link::do_confirm_shutdown): New virtual function
declaration for qt GUI.
(octave_qt_link::mutex): Added. A QMutex for communicating with Qt GUI.
(octave_qt_link::waitcondition): Added. For process wait.
(octave_qt_link::shutdown_confirmation): Added. Store confirmation result.
(octave_qt_link::_shutdown_confirm_result): Added. Confirmation result.
(octave_qt_link::exit_signal): Signal renamed exit_app_signal.
(octave_qt_link::confirm_shutdown_signal): Added.
(octave_qt_link::exit_app_signal): Renamed of exit_signal.
octave-link.h (octave_link::confirm_shutdown): Added. Access virtual function
do_confirm_shutdown.
(octave_link::do_confirm_shutdown): Added. Virtual function for GUI link.
toplev.cc (clean_up_and_exit): Change 'retval' to 'status', as header file uses
argument name 'status'.
(quit): First initiate GUI shutdown via octave_link::confirm_shutdown() and if
not confirmed, immediately return thereby avoiding exit sequence.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Sat, 14 Feb 2015 11:27:10 -0600 |
parents | 4197fc428c7d |
children | 034bcac0b61c |
rev | line source |
---|---|
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
1 /* |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
2 |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19642
diff
changeset
|
3 Copyright (C) 2013-2015 John W. Eaton |
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19642
diff
changeset
|
4 Copyright (C) 2011-2015 Jacob Dawid |
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
5 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
6 This file is part of Octave. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
7 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
8 Octave is free software; you can redistribute it and/or modify it |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
9 under the terms of the GNU General Public License as published by the |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
10 Free Software Foundation; either version 3 of the License, or (at your |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
11 option) any later version. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
12 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
16 for more details. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
17 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
19 along with Octave; see the file COPYING. If not, see |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
20 <http://www.gnu.org/licenses/>. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
21 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
22 */ |
13501 | 23 |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
24 #if !defined (octave_main_window_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17790
diff
changeset
|
25 #define octave_main_window_h 1 |
13501 | 26 |
14599
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
27 // Qt includes |
17827
2de613986374
include Qt files with <QFoo> instead of <QtGui/QFoo> (bug #40252)
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
28 #include <QMainWindow> |
13501 | 29 #include <QThread> |
30 #include <QTabWidget> | |
31 #include <QMdiArea> | |
32 #include <QStatusBar> | |
33 #include <QToolBar> | |
34 #include <QQueue> | |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13614
diff
changeset
|
35 #include <QMdiSubWindow> |
14318
df86157a4912
Re-enable MSVC/Win32 compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
14308
diff
changeset
|
36 #include <QCloseEvent> |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14602
diff
changeset
|
37 #include <QToolButton> |
14700
7623bece76df
Implemented logic for current directory bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14695
diff
changeset
|
38 #include <QComboBox> |
17329
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
39 #include <QSemaphore> |
19632
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
40 #include <QPointer> |
14599
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
41 |
14676
35512b788af2
Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14674
diff
changeset
|
42 // Editor includes |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
43 #include "file-editor-interface.h" |
14599
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
44 |
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
45 // QTerminal includes |
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
46 #include "QTerminal.h" |
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
47 |
97cb9286919c
Cleaned up code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14588
diff
changeset
|
48 // Own includes |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
49 #include "dialog.h" |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
50 #include "resource-manager.h" |
16445
3f8d3fc907af
store workspace model in main_window, not in workspace view
John W. Eaton <jwe@octave.org>
parents:
16438
diff
changeset
|
51 #include "workspace-model.h" |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
52 #include "workspace-view.h" |
16460
4d4e7c6f839d
use consistent names for dock-widget files
John W. Eaton <jwe@octave.org>
parents:
16459
diff
changeset
|
53 #include "history-dock-widget.h" |
4d4e7c6f839d
use consistent names for dock-widget files
John W. Eaton <jwe@octave.org>
parents:
16459
diff
changeset
|
54 #include "files-dock-widget.h" |
4d4e7c6f839d
use consistent names for dock-widget files
John W. Eaton <jwe@octave.org>
parents:
16459
diff
changeset
|
55 #include "terminal-dock-widget.h" |
4d4e7c6f839d
use consistent names for dock-widget files
John W. Eaton <jwe@octave.org>
parents:
16459
diff
changeset
|
56 #include "documentation-dock-widget.h" |
16421
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
57 #include "octave-qt-link.h" |
16798
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
58 #include "octave-dock-widget.h" |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
16514
diff
changeset
|
59 #include "find-files-dialog.h" |
13614
5cb93c6d8aab
Important subwindows are not closable now. A close button is still displayed, which seems to be q Qt bug.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
60 |
19632
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
61 class settings_dialog; |
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
62 |
13501 | 63 /** |
19006
96751a74bbbb
Start doxygenising sources
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
18944
diff
changeset
|
64 * @class MainWindow |
15367
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15300
diff
changeset
|
65 * |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15300
diff
changeset
|
66 * Represents the main window. |
501a9cc2c68f
maint: whitespace cleanup in GUI code
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15300
diff
changeset
|
67 */ |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
68 class main_window : public QMainWindow |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
69 { |
16446
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
70 Q_OBJECT |
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
71 |
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
72 public: |
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
73 |
16502
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
74 typedef std::pair <std::string, std::string> name_pair; |
19302
37159a873c96
preserve text on Windows terminal resize (bug #41893; patch #8532)
John W. Eaton <jwe@octave.org>
parents:
18944
diff
changeset
|
75 typedef std::pair <int, int> int_pair; |
16502
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
76 |
16446
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
77 main_window (QWidget *parent = 0); |
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
78 |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
79 ~main_window (void); |
13501 | 80 |
16576
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
81 bool command_window_has_focus (void) const; |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
82 |
16449
c129a8b73d25
avoid unneeded signals for window focus
John W. Eaton <jwe@octave.org>
parents:
16448
diff
changeset
|
83 void focus_command_window (void); |
c129a8b73d25
avoid unneeded signals for window focus
John W. Eaton <jwe@octave.org>
parents:
16448
diff
changeset
|
84 |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13533
diff
changeset
|
85 signals: |
19422
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
86 |
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
87 void active_dock_changed (octave_dock_widget *, octave_dock_widget *); |
19429
be53bf420464
fix access to already removed editor window at exit
Torsten <ttl@justmail.de>
parents:
19422
diff
changeset
|
88 void editor_focus_changed (bool); |
19422
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
89 |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
90 void settings_changed (const QSettings *); |
19303
c6615ca0a11d
horizontal scrollbar for GUI terminal on Windows systems
John W. Eaton <jwe@octave.org>
parents:
19302
diff
changeset
|
91 void init_terminal_size_signal (void); |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16456
diff
changeset
|
92 void new_file_signal (const QString&); |
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16456
diff
changeset
|
93 void open_file_signal (const QString&); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
94 |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16970
diff
changeset
|
95 void show_doc_signal (const QString&); |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16970
diff
changeset
|
96 |
16576
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
97 void insert_debugger_pointer_signal (const QString& file, int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
98 void delete_debugger_pointer_signal (const QString& file, int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
99 void update_breakpoint_marker_signal (bool insert, const QString& file, |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
100 int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
101 |
16648
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
102 void copyClipboard_signal (void); |
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
103 void pasteClipboard_signal (void); |
18555
2d5d0d86432e
gui: Add select all menu (Bug #41797)
John Donoghue <john.donoghue@ieee.org>
parents:
18551
diff
changeset
|
104 void selectAll_signal (void); |
16648
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
105 |
18665
777281eeb3d4
add all editor actions to the shortcut manager and fix their shortcut context
Torsten <ttl@justmail.de>
parents:
18639
diff
changeset
|
106 public slots: |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
107 |
19422
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
108 void focus_changed (QWidget *w_old, QWidget *w_new); |
19631
4e85ca0b4887
add apply button to the settings dialog (bug #44081)
Torsten <ttl@justmail.de>
parents:
19585
diff
changeset
|
109 void request_reload_settings (); |
19422
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
110 |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15204
diff
changeset
|
111 void report_status_message (const QString& statusMessage); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
112 void handle_save_workspace_request (void); |
16504
49b059bf27c7
allow loading files from file browser
John W. Eaton <jwe@octave.org>
parents:
16502
diff
changeset
|
113 void handle_load_workspace_request (const QString& file = QString ()); |
16514
db045633405c
Added clear command window implementation to MainWindow Clear COmmand Window menu.
John Donoghue <john.donoghue@ieee.org>
parents:
16512
diff
changeset
|
114 void handle_clear_command_window_request (void); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
115 void handle_clear_workspace_request (void); |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
116 void handle_clear_history_request (void); |
16502
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
117 void handle_rename_variable_request (const QString& old_name, |
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
118 const QString& new_name); |
16539
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16525
diff
changeset
|
119 void handle_undo_request (void); |
16452
744ff2fe11ce
add create script context menu to history window
John Donoghue <john.donoghue@ieee.org>
parents:
16451
diff
changeset
|
120 void new_file (const QString& commands = QString ()); |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16456
diff
changeset
|
121 void open_file (const QString& file_name = QString ()); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
122 void open_online_documentation_page (void); |
17599
f5950975a172
community news dock widget and other user info in GUI
John W. Eaton <jwe@octave.org>
parents:
17509
diff
changeset
|
123 void display_release_notes (void); |
17939
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
124 void load_and_display_community_news (int serial = -1); |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
125 void display_community_news (const QString& news); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
126 void open_bug_tracker_page (void); |
17509 | 127 void open_octave_packages_page (void); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
128 void open_agora_page (void); |
17509 | 129 void open_contribute_page (void); |
130 void open_developer_page (void); | |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
131 void process_settings_dialog_request (const QString& desired_tab |
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
132 = QString ()); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
133 void show_about_octave (void); |
16413
28136851099a
remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16399
diff
changeset
|
134 void notice_settings (const QSettings *settings); |
19714
21015ca26566
Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
19697
diff
changeset
|
135 void confirm_shutdown_octave (void); |
16468
0f143f68078d
use signal/slot for updating workspace instead of using event listener
John W. Eaton <jwe@octave.org>
parents:
16460
diff
changeset
|
136 void prepare_to_exit (void); |
19714
21015ca26566
Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
19697
diff
changeset
|
137 void exit_app (int status); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
138 void reset_windows (void); |
16437
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
139 |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
140 void change_directory (const QString& dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
141 void browse_for_directory (void); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
142 void set_current_working_directory (const QString& dir); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
143 void change_directory_up (void); |
919796a440c6
use signal for changing directory
John W. Eaton <jwe@octave.org>
parents:
16431
diff
changeset
|
144 void accept_directory_line_edit (void); |
13501 | 145 |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
146 void execute_command_in_terminal (const QString& dir); |
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
147 void run_file_in_terminal (const QFileInfo& info); |
16446
4b3a4bf8569b
improve encapsulation of command window object
John W. Eaton <jwe@octave.org>
parents:
16445
diff
changeset
|
148 |
16566 | 149 void handle_new_figure_request (void); |
150 | |
16438
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
151 void handle_enter_debugger (void); |
a971d8bdaadc
use signals instead of event queue for entering/leaving debug mode
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
152 void handle_exit_debugger (void); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
153 void debug_continue (void); |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
154 void debug_step_into (void); |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
155 void debug_step_over (void); |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
156 void debug_step_out (void); |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
157 void debug_quit (void); |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14721
diff
changeset
|
158 |
16576
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
159 void handle_insert_debugger_pointer_request (const QString& file, int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
160 void handle_delete_debugger_pointer_request (const QString& file, int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
161 void handle_update_breakpoint_marker_request (bool insert, |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
162 const QString& file, int line); |
2754c5fd6ae0
keep focus in the command window after dbstop, dbstep, etc.
John W. Eaton <jwe@octave.org>
parents:
16570
diff
changeset
|
163 |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
164 void read_settings (void); |
19303
c6615ca0a11d
horizontal scrollbar for GUI terminal on Windows systems
John W. Eaton <jwe@octave.org>
parents:
19302
diff
changeset
|
165 void init_terminal_size (void); |
16593
e13051d7a472
allow GUI window layout to be restored
John W. Eaton <jwe@octave.org>
parents:
16581
diff
changeset
|
166 void set_window_layout (QSettings *settings); |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
167 void write_settings (void); |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
168 void connect_visibility_changed (void); |
15425
8ae34ffe5c1b
Retain QsciAPIs lexer_api as part of lexer_octave_gui object (bug #37359)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15402
diff
changeset
|
169 |
16648
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
170 void copyClipboard (void); |
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
171 void pasteClipboard (void); |
18555
2d5d0d86432e
gui: Add select all menu (Bug #41797)
John Donoghue <john.donoghue@ieee.org>
parents:
18551
diff
changeset
|
172 void selectAll (void); |
16648
b04413e5a811
improve handling of interrupts, copy and paste shortcuts
John W. Eaton <jwe@octave.org>
parents:
16642
diff
changeset
|
173 |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
174 void connect_uiwidget_links (); |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
175 |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
176 void handle_create_dialog (const QString& message, const QString& title, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
177 const QString& icon, const QStringList& button, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
178 const QString& defbutton, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
179 const QStringList& role); |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
180 |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
181 void handle_create_listview (const QStringList& list, const QString& mode, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
182 int width, int height, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
183 const QIntList& initial, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
184 const QString& name, |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16547
diff
changeset
|
185 const QStringList& prompt, |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
186 const QString& ok_string, |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
187 const QString& cancel_string); |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
188 |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
189 void handle_create_inputlayout (const QStringList&, const QString&, |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16547
diff
changeset
|
190 const QFloatList&, const QFloatList&, |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
191 const QStringList&); |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16504
diff
changeset
|
192 |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
193 void handle_create_filedialog (const QStringList &filters, |
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
194 const QString& title, const QString& filename, |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16576
diff
changeset
|
195 const QString &dirname, |
16581
fa4a035e0cf4
Add octave_link uiputfile implementation
John Donoghue <john.donoghue@ieee.org>
parents:
16579
diff
changeset
|
196 const QString& multimode); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16576
diff
changeset
|
197 |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16970
diff
changeset
|
198 void handle_show_doc (const QString &file); |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16970
diff
changeset
|
199 |
18309
024940bd5b77
gui: provide prefernces for the octave directory at startup
Torsten <ttl@justmail.de>
parents:
18253
diff
changeset
|
200 void handle_octave_ready (); |
024940bd5b77
gui: provide prefernces for the octave directory at startup
Torsten <ttl@justmail.de>
parents:
18253
diff
changeset
|
201 |
17790
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
202 // find files dialog |
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
203 void find_files (const QString &startdir=QDir::currentPath ()); |
86c6ae5f969e
Use GNU style coding conventions for code in libgui/
Rik <rik@octave.org>
parents:
17764
diff
changeset
|
204 void find_files_finished (int); |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
205 |
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
206 // setting global shortcuts |
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
207 void set_global_shortcuts (bool enable); |
18684
86eca5d178a6
disable some global shortcuts when editor gets focus to prevent conflicts
Torsten <ttl@justmail.de>
parents:
18665
diff
changeset
|
208 void set_global_edit_shortcuts (bool enable); |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
209 |
19302
37159a873c96
preserve text on Windows terminal resize (bug #41893; patch #8532)
John W. Eaton <jwe@octave.org>
parents:
18944
diff
changeset
|
210 void set_screen_size (int ht, int wd); |
37159a873c96
preserve text on Windows terminal resize (bug #41893; patch #8532)
John W. Eaton <jwe@octave.org>
parents:
18944
diff
changeset
|
211 |
17117
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
212 // handling the clipboard |
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
213 void clipboard_has_changed (QClipboard::Mode); |
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
214 void clear_clipboard (); |
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
215 |
18545
17baa684892c
fix flashing while debuggung and editor is tabbed behind console (bug #41757)
Torsten <ttl@justmail.de>
parents:
18250
diff
changeset
|
216 // get the dockwidgets |
17baa684892c
fix flashing while debuggung and editor is tabbed behind console (bug #41757)
Torsten <ttl@justmail.de>
parents:
18250
diff
changeset
|
217 QList<octave_dock_widget *> get_dock_widget_list () |
17baa684892c
fix flashing while debuggung and editor is tabbed behind console (bug #41757)
Torsten <ttl@justmail.de>
parents:
18250
diff
changeset
|
218 { return dock_widget_list (); } |
17117
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
219 |
13501 | 220 protected: |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
221 void closeEvent (QCloseEvent * closeEvent); |
13501 | 222 |
223 private: | |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
224 |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
225 void construct (void); |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
226 |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
227 void construct_octave_qt_link (void); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
228 |
18697
908523bd79b4
use shortcut manager for the debug menu
Torsten <ttl@justmail.de>
parents:
18684
diff
changeset
|
229 QAction *add_action (QMenu *menu, const QIcon &icon, const QString &text, |
18710
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
230 const char *member, const QWidget *receiver = 0); |
18697
908523bd79b4
use shortcut manager for the debug menu
Torsten <ttl@justmail.de>
parents:
18684
diff
changeset
|
231 |
18944
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18717
diff
changeset
|
232 void enable_menu_shortcuts (bool enable); |
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18717
diff
changeset
|
233 QMenu* m_add_menu (QMenuBar *p, QString text); |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
234 void construct_menu_bar (void); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
235 void construct_file_menu (QMenuBar *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
236 void construct_new_menu (QMenu *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
237 void construct_edit_menu (QMenuBar *p); |
18697
908523bd79b4
use shortcut manager for the debug menu
Torsten <ttl@justmail.de>
parents:
18684
diff
changeset
|
238 QAction *construct_debug_menu_item (const char *icon, const QString& item, |
908523bd79b4
use shortcut manager for the debug menu
Torsten <ttl@justmail.de>
parents:
18684
diff
changeset
|
239 const char* member); |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
240 void construct_debug_menu (QMenuBar *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
241 QAction *construct_window_menu_item (QMenu *p, const QString& item, |
18707
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
242 bool checkable, QWidget*); |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
243 void construct_window_menu (QMenuBar *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
244 void construct_help_menu (QMenuBar *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
245 void construct_documentation_menu (QMenu *p); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
246 |
17599
f5950975a172
community news dock widget and other user info in GUI
John W. Eaton <jwe@octave.org>
parents:
17509
diff
changeset
|
247 void construct_news_menu (QMenuBar *p); |
f5950975a172
community news dock widget and other user info in GUI
John W. Eaton <jwe@octave.org>
parents:
17509
diff
changeset
|
248 |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
249 void construct_tool_bar (void); |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
250 |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
251 void establish_octave_link (void); |
13501 | 252 |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
253 void save_workspace_callback (const std::string& file); |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
254 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
255 void load_workspace_callback (const std::string& file); |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
256 |
16502
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
257 void rename_variable_callback (const name_pair& names); |
45ae1038ee89
allow renaming of variables in workspace viewer
John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
258 |
16539
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16525
diff
changeset
|
259 void command_window_undo_callback (void); |
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16525
diff
changeset
|
260 |
16514
db045633405c
Added clear command window implementation to MainWindow Clear COmmand Window menu.
John Donoghue <john.donoghue@ieee.org>
parents:
16512
diff
changeset
|
261 void clear_command_window_callback (void); |
db045633405c
Added clear command window implementation to MainWindow Clear COmmand Window menu.
John Donoghue <john.donoghue@ieee.org>
parents:
16512
diff
changeset
|
262 |
16541
6afb29359968
set size of command window terminal at GUI startup
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
263 void resize_command_window_callback (void); |
6afb29359968
set size of command window terminal at GUI startup
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
264 |
19302
37159a873c96
preserve text on Windows terminal resize (bug #41893; patch #8532)
John W. Eaton <jwe@octave.org>
parents:
18944
diff
changeset
|
265 void set_screen_size_callback (const int_pair&); |
37159a873c96
preserve text on Windows terminal resize (bug #41893; patch #8532)
John W. Eaton <jwe@octave.org>
parents:
18944
diff
changeset
|
266 |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
267 void clear_workspace_callback (void); |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
268 |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
269 void clear_history_callback (void); |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
270 |
17329
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
271 void execute_command_callback (); |
16635
25e418d23a4b
fix running files from file browser's context menu
Torsten <ttl@justmail.de>
parents:
16593
diff
changeset
|
272 void run_file_callback (const QFileInfo& info); |
18156
14acb08d75fa
gui: optionally set focus to console when a command is run from another widget
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
273 bool focus_console_after_command (); |
16570
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16566
diff
changeset
|
274 |
16566 | 275 void new_figure_callback (void); |
276 | |
15402
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
277 void change_directory_callback (const std::string& directory); |
7f423c6111c6
refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents:
15388
diff
changeset
|
278 |
18250
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
279 void queue_command (QString command); |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
280 |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
281 void queue_debug (QString command); |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
282 |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
283 void execute_debug_callback (); |
17329
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
284 |
18717
f017240310fb
disabling global shortcuts when terminal has focus as user preference
Torsten <ttl@justmail.de>
parents:
18711
diff
changeset
|
285 void configure_shortcuts (); |
f017240310fb
disabling global shortcuts when terminal has focus as user preference
Torsten <ttl@justmail.de>
parents:
18711
diff
changeset
|
286 |
16451
d4c3736e1e28
dynamically allocate Qt widgets
John W. Eaton <jwe@octave.org>
parents:
16450
diff
changeset
|
287 workspace_model *_workspace_model; |
16448
47fe533ec85b
avoid using new for status bar and workspace_model objects
John W. Eaton <jwe@octave.org>
parents:
16447
diff
changeset
|
288 |
18944
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18717
diff
changeset
|
289 QHash<QMenu*, QStringList> _hash_menu_text; |
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18717
diff
changeset
|
290 |
b2c4d6d461f0
fix conflict between main and editor menus when using alt keys (bug #42659)
Torsten <ttl@justmail.de>
parents:
18717
diff
changeset
|
291 |
16448
47fe533ec85b
avoid using new for status bar and workspace_model objects
John W. Eaton <jwe@octave.org>
parents:
16447
diff
changeset
|
292 // Toolbars. |
16451
d4c3736e1e28
dynamically allocate Qt widgets
John W. Eaton <jwe@octave.org>
parents:
16450
diff
changeset
|
293 QStatusBar *status_bar; |
16448
47fe533ec85b
avoid using new for status bar and workspace_model objects
John W. Eaton <jwe@octave.org>
parents:
16447
diff
changeset
|
294 |
47fe533ec85b
avoid using new for status bar and workspace_model objects
John W. Eaton <jwe@octave.org>
parents:
16447
diff
changeset
|
295 // Subwindows. |
16451
d4c3736e1e28
dynamically allocate Qt widgets
John W. Eaton <jwe@octave.org>
parents:
16450
diff
changeset
|
296 terminal_dock_widget *command_window; |
d4c3736e1e28
dynamically allocate Qt widgets
John W. Eaton <jwe@octave.org>
parents:
16450
diff
changeset
|
297 history_dock_widget *history_window; |
16450
3207f1d62e74
improve encapsulation of file browser window object
John W. Eaton <jwe@octave.org>
parents:
16449
diff
changeset
|
298 files_dock_widget *file_browser_window; |
16453
2e3c652c89d1
improve encapsulation of documentation browser window object
John W. Eaton <jwe@octave.org>
parents:
16452
diff
changeset
|
299 documentation_dock_widget *doc_browser_window; |
16457
10edb6f1ae98
improve encapsulation of file editor window object
John W. Eaton <jwe@octave.org>
parents:
16456
diff
changeset
|
300 file_editor_interface *editor_window; |
16459
cbc39a3d0c42
improve encapsulation of workspace window object
John W. Eaton <jwe@octave.org>
parents:
16457
diff
changeset
|
301 workspace_view *workspace_window; |
16798
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
302 QList<octave_dock_widget *> dock_widget_list () |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
303 { |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
304 QList<octave_dock_widget *> list = QList<octave_dock_widget *> (); |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
305 list.append (static_cast<octave_dock_widget *> (command_window)); |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
306 list.append (static_cast<octave_dock_widget *> (history_window)); |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
307 list.append (static_cast<octave_dock_widget *> (file_browser_window)); |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
308 list.append (static_cast<octave_dock_widget *> (doc_browser_window)); |
17291
756bb4b58ad0
* main-window.h: exclude editor from widget list when qscintilla is missing
Torsten <ttl@justmail.de>
parents:
17117
diff
changeset
|
309 #ifdef HAVE_QSCINTILLA |
16798
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
310 list.append (static_cast<octave_dock_widget *> (editor_window)); |
17291
756bb4b58ad0
* main-window.h: exclude editor from widget list when qscintilla is missing
Torsten <ttl@justmail.de>
parents:
17117
diff
changeset
|
311 #endif |
16798
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
312 list.append (static_cast<octave_dock_widget *> (workspace_window)); |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
313 return list; |
d749c9b588e5
make stand-alone windows from dock widgets when floating (bug #38785)
Torsten <ttl@justmail.de>
parents:
16648
diff
changeset
|
314 } |
19422
476032040df9
determining the active dock from focus changes in the gui
Torsten <ttl@justmail.de>
parents:
19303
diff
changeset
|
315 octave_dock_widget *_active_dock; |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
316 |
17619
4288b90f18c4
icons for news and release notes widgets
Torsten <ttl@justmail.de>
parents:
17599
diff
changeset
|
317 QString _release_notes_icon; |
4288b90f18c4
icons for news and release notes widgets
Torsten <ttl@justmail.de>
parents:
17599
diff
changeset
|
318 |
16525
e192525236ad
configurable size of toolbar icons
Torsten <ttl@justmail.de>
parents:
16519
diff
changeset
|
319 QToolBar *_main_tool_bar; |
17599
f5950975a172
community news dock widget and other user info in GUI
John W. Eaton <jwe@octave.org>
parents:
17509
diff
changeset
|
320 |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
321 QMenu *_debug_menu; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
322 |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
323 QAction *_debug_continue; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
324 QAction *_debug_step_into; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
325 QAction *_debug_step_over; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
326 QAction *_debug_step_out; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
327 QAction *_debug_quit; |
13501 | 328 |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
329 QAction *_new_script_action; |
17901
2c241092b47b
use edit.m for creating a new function with the gui (bug #40502)
Torsten <ttl@justmail.de>
parents:
17883
diff
changeset
|
330 QAction *_new_function_action; |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
331 QAction *_open_action; |
18611
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
332 QAction *_new_figure_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
333 QAction *_load_workspace_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
334 QAction *_save_workspace_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
335 QAction *_preferences_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
336 QAction *_exit_action; |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
337 |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
338 QAction *_copy_action; |
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
339 QAction *_paste_action; |
17117
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
340 QAction *_clear_clipboard_action; |
16454
246d25c8761b
split main_window::construct for clarity
John W. Eaton <jwe@octave.org>
parents:
16453
diff
changeset
|
341 QAction *_undo_action; |
18611
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
342 QAction *_clear_command_window_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
343 QAction *_clear_command_history_action; |
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
344 QAction *_clear_workspace_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
345 QAction *_find_files_action; |
18611
086093fbdc1a
first implementation of a shortcut manager (bug #41217)
Torsten <ttl@justmail.de>
parents:
18555
diff
changeset
|
346 QAction *_select_all_action; |
16970
78116b88dbf5
enable readline key bindings in terminal widget of gui (bug #36986)
Torsten <ttl@justmail.de>
parents:
16798
diff
changeset
|
347 |
18707
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
348 QAction *_show_command_window_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
349 QAction *_show_history_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
350 QAction *_show_workspace_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
351 QAction *_show_file_browser_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
352 QAction *_show_editor_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
353 QAction *_show_documentation_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
354 QAction *_command_window_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
355 QAction *_history_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
356 QAction *_workspace_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
357 QAction *_file_browser_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
358 QAction *_editor_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
359 QAction *_documentation_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
360 QAction *_reset_windows_action; |
f31fde98c872
use shortcut manager for the window menu
Torsten <ttl@justmail.de>
parents:
18697
diff
changeset
|
361 |
18710
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
362 QAction *_ondisk_doc_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
363 QAction *_online_doc_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
364 QAction *_report_bug_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
365 QAction *_octave_packages_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
366 QAction *_agora_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
367 QAction *_contribute_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
368 QAction *_developer_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
369 QAction *_about_octave_action; |
584b20e9112c
use shortcut manager for the main help menu
Torsten <ttl@justmail.de>
parents:
18707
diff
changeset
|
370 |
18711
9ef65c422f53
use shortcut manager for the main news menu
Torsten <ttl@justmail.de>
parents:
18710
diff
changeset
|
371 QAction *_release_notes_action; |
9ef65c422f53
use shortcut manager for the main news menu
Torsten <ttl@justmail.de>
parents:
18710
diff
changeset
|
372 QAction *_current_news_action; |
9ef65c422f53
use shortcut manager for the main news menu
Torsten <ttl@justmail.de>
parents:
18710
diff
changeset
|
373 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
374 // Toolbars. |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
375 QComboBox *_current_directory_combo_box; |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
376 static const int current_directory_width = 300; |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
377 static const int current_directory_max_visible = 16; |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
378 static const int current_directory_max_count = 16; |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
379 QLineEdit *_current_directory_line_edit; |
14670
7fbea449737d
Restructured menus, added toolbar and current directory line edit.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14602
diff
changeset
|
380 |
19632
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
381 // settings dialog as guarded pointer (set to 0 when deleted) |
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
382 QPointer<settings_dialog> _settings_dlg; |
101ce4eaa56c
prevent opening the settings dialog multiple times
Torsten <ttl@justmail.de>
parents:
19631
diff
changeset
|
383 |
16519
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
16514
diff
changeset
|
384 // Find files dialog |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
16514
diff
changeset
|
385 find_files_dialog * find_files_dlg; |
3e8fd0c479b4
Add find files implemtation to main window menu
John Donoghue <john.donoghue@ieee.org>
parents:
16514
diff
changeset
|
386 |
17883
3851e5fde76d
GUI: allow only one release notes windows to be open
John Donoghue <john.donoghue@ieee.org>
parents:
17827
diff
changeset
|
387 // release notes window |
3851e5fde76d
GUI: allow only one release notes windows to be open
John Donoghue <john.donoghue@ieee.org>
parents:
17827
diff
changeset
|
388 QWidget * release_notes_window; |
3851e5fde76d
GUI: allow only one release notes windows to be open
John Donoghue <john.donoghue@ieee.org>
parents:
17827
diff
changeset
|
389 |
17939
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
390 QWidget * community_news_window; |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
391 |
16421
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
392 octave_qt_link *_octave_qt_link; |
40d1ddca4db5
improve use of octave_link
John W. Eaton <jwe@octave.org>
parents:
16413
diff
changeset
|
393 |
17117
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
394 QClipboard *_clipboard; |
47b504503a3f
disable global paste action when clipboard is empty
Torsten <ttl@justmail.de>
parents:
17029
diff
changeset
|
395 |
16456
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
396 // Flag for closing whole application. |
203efbbcea63
* main-window.h, main-window.cc: Style fixes.
John W. Eaton <jwe@octave.org>
parents:
16454
diff
changeset
|
397 bool _closing; |
17329
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
398 |
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
399 // semaphore to synchronize execution signals and related callback |
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
400 QStringList *_cmd_queue; |
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
401 QSemaphore _cmd_processing; |
352b442a72a5
queue and synchronize mutliple commands executed fro history (bug #39723)
Torsten <ttl@justmail.de>
parents:
17291
diff
changeset
|
402 QMutex _cmd_queue_mutex; |
18250
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
403 |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
404 // semaphore to synchronize debug signals and related callbacks |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
405 QStringList *_dbg_queue; |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
406 QSemaphore _dbg_processing; |
0da2e7051778
synchronize gui's debug actions with the octave core thread (bug #41139)
Torsten <ttl@justmail.de>
parents:
18031
diff
changeset
|
407 QMutex _dbg_queue_mutex; |
18717
f017240310fb
disabling global shortcuts when terminal has focus as user preference
Torsten <ttl@justmail.de>
parents:
18711
diff
changeset
|
408 |
f017240310fb
disabling global shortcuts when terminal has focus as user preference
Torsten <ttl@justmail.de>
parents:
18711
diff
changeset
|
409 bool _prevent_readline_conflicts; |
19585
f9a944b9e1cb
provide a user preference for printing the debug location in the terminal
Torsten <ttl@justmail.de>
parents:
19572
diff
changeset
|
410 bool _suppress_dbg_location; |
13501 | 411 }; |
412 | |
17939
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
413 class news_reader : public QObject |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
414 { |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
415 Q_OBJECT |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
416 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
417 public: |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
418 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
419 news_reader (const QString& xbase_url, const QString& xpage, |
17940
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17939
diff
changeset
|
420 int xserial = -1, bool xconnect_to_web = false) |
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17939
diff
changeset
|
421 : QObject (), base_url (xbase_url), page (xpage), serial (xserial), |
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17939
diff
changeset
|
422 connect_to_web (xconnect_to_web) |
17939
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
423 { } |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
424 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
425 public slots: |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
426 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
427 void process (void); |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
428 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
429 signals: |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
430 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
431 void display_news_signal (const QString& news); |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
432 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
433 void finished (void); |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
434 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
435 private: |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
436 |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
437 QString base_url; |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
438 QString page; |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
439 int serial; |
17940
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17939
diff
changeset
|
440 bool connect_to_web; |
17939
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
441 }; |
16cf38c39915
display community news in simple window; check timestamp and serial number
John W. Eaton <jwe@octave.org>
parents:
17918
diff
changeset
|
442 |
13501 | 443 #endif // MAINWINDOW_H |