Mercurial > octave
annotate libgui/src/files-dock-widget.h @ 31701:286306a9a393
eliminate base_qobject from octave_dock_widget and other classes
* octave-dock-widget.h, octave-dock-widget.cc
(octave_dock_widget::m_octave_qobj): Delete data member.
(octave_dock_widget::octave_dock_widget): Delete base_qobject
construtor argument. Change all uses.
* documentation-dock-widget.h, documentation-dock-widget.cc
(documentation_dock_widget::documentation_dock_widget):
Delete base_qobject construtor argument. Change all uses.
* files-dock-widget.h, files-dock-widget.cc
(files_dock_widget::files_dock_widget):
Delete base_qobject construtor argument. Change all uses.
* history-dock-widget.h, history-dock-widget.cc
(history_dock_widget::history_dock_widget):
Delete base_qobject construtor argument. Change all uses.
* file-editor-interface.h
(file_editor_interface::file_editor_interface):
Delete base_qobject construtor argument. Change all uses.
* file-editor-tab.h, file-editor-tab.cc
(file_editor_tab::file_editor_tab):
Delete base_qobject construtor argument. Change all uses.
* file-editor.h, file-editor.cc (file_editor::file_editor):
Delete base_qobject construtor argument. Change all uses.
* octave-qscintilla.h, octave-qscintilla.cc
(octave_qscintilla::octave_qscintilla):
Delete base_qobject construtor argument. Change all uses.
* terminal-dock-widget.h, terminal-dock-widget.cc
(terminal_dock_widget::terminal_dock_widget): Pass bool to control use
of experimental terminal widget instead of base_qobject. Change all uses.
* variable-editor.h, variable-editor.cc
(variable_editor::variable_editor):
Delete base_qobject construtor argument. Change all uses.
* workspace-view.h, workspace-view.cc
(workspace_view::workspace_view):
Delete base_qobject construtor argument. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 02 Jan 2023 12:38:44 -0500 |
parents | deb553ac2c54 |
children | 5f11de0e7440 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30398
diff
changeset
|
3 // Copyright (C) 2011-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
13495 | 25 |
21203
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
20945
diff
changeset
|
26 #if ! defined (octave_files_dock_widget_h) |
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
20945
diff
changeset
|
27 #define octave_files_dock_widget_h 1 |
13495 | 28 |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
29 #include <QAction> |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
30 #include <QComboBox> |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
31 #include <QDate> |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
32 #include <QFileSystemModel> |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
33 #include <QList> |
13495 | 34 #include <QListView> |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
35 #include <QListWidget> |
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
36 #include <QMouseEvent> |
13495 | 37 #include <QObject> |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
38 #include <QSignalMapper> |
13495 | 39 #include <QToolBar> |
40 #include <QToolButton> | |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
41 #include <QTreeView> |
13495 | 42 #include <QVBoxLayout> |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
43 #include <QWidget> |
13495 | 44 |
16057
c3057d80cf91
Created common octave_dock_widget class
Richard Crozier <richard.crozier@yahoo.co.uk>
parents:
15552
diff
changeset
|
45 #include "octave-dock-widget.h" |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27308
diff
changeset
|
46 |
31646
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30757
diff
changeset
|
47 OCTAVE_BEGIN_NAMESPACE(octave) |
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30757
diff
changeset
|
48 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 //! Dock widget to display files in the current directory. |
16450
3207f1d62e74
improve encapsulation of file browser window object
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
50 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 class files_dock_widget : public octave_dock_widget |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
52 { |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
53 Q_OBJECT |
16450
3207f1d62e74
improve encapsulation of file browser window object
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
54 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
55 public: |
16450
3207f1d62e74
improve encapsulation of file browser window object
John W. Eaton <jwe@octave.org>
parents:
16437
diff
changeset
|
56 |
31701
286306a9a393
eliminate base_qobject from octave_dock_widget and other classes
John W. Eaton <jwe@octave.org>
parents:
31649
diff
changeset
|
57 files_dock_widget (QWidget *parent); |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
58 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
59 ~files_dock_widget (void) = default; |
16057
c3057d80cf91
Created common octave_dock_widget class
Richard Crozier <richard.crozier@yahoo.co.uk>
parents:
15552
diff
changeset
|
60 |
27590
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
61 signals: |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
62 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
63 //! Emitted, whenever the user requested to open a file. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
64 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
65 void open_file (const QString& fileName); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
66 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
67 //! Emitted, whenever the currently displayed directory changed. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
68 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
69 void displayed_directory_changed (const QString& dir); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
70 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
71 //! Emitted, whenever the user requested to load a file in the text editor. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
72 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
73 void load_file_signal (const QString& fileName); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
74 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
75 //! Emitted, whenever the user requested to open an unknown type file. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
76 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
77 void open_any_signal (const QString& fileName); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
78 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
79 //! Emitted, whenever the user requested to run a file. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
80 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
81 void run_file_signal (const QFileInfo& info); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
82 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
83 //! Emitted, whenever wants to search for a file . |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
84 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
85 void find_files_signal (const QString& startdir); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
86 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
87 //! Emitted, whenever the user removes or renames a file. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
88 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
89 void file_remove_signal (const QString& old_name, const QString& new_name); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
90 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
91 //! Emitted, when a file or directory is renamed. |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
92 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
93 void file_renamed_signal (bool); |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
94 |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
95 //! Emitted, when the path has to be modified |
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
96 |
29782
02461b0ccc00
reduce dependence of files_dock_widget on Octave interpreter
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
97 void modify_path_signal (const QStringList& dir_list, bool rm, |
02461b0ccc00
reduce dependence of files_dock_widget on Octave interpreter
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
98 bool subdirs); |
27590
f6b729077ebd
use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents:
27412
diff
changeset
|
99 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
100 public slots: |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
101 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
102 //! Slot for handling a change in directory via double click. |
13495 | 103 |
30398
d4d83344d653
maint: style check C++ files in src/ and libgui/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
29782
diff
changeset
|
104 void item_double_clicked (const QModelIndex& index); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
105 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
106 //! Slot for handling the up-directory button in the toolbar. |
14863
3ff18e21c742
Added a few comments.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14803
diff
changeset
|
107 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
108 void change_directory_up (void); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
109 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
110 //! Slot for handling the sync octave directory button in the toolbar. |
16499
facf00ce97d3
gui: configurable synchronization between file browser and octave directory
Torsten <ttl@justmail.de>
parents:
16498
diff
changeset
|
111 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
112 void do_sync_octave_directory (void); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
113 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
114 //! Slot for handling the sync browser directory button in the toolbar. |
16499
facf00ce97d3
gui: configurable synchronization between file browser and octave directory
Torsten <ttl@justmail.de>
parents:
16498
diff
changeset
|
115 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
116 void do_sync_browser_directory (void); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
117 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
118 //! Sets the current directory being displayed. |
14863
3ff18e21c742
Added a few comments.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14803
diff
changeset
|
119 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
120 void set_current_directory (const QString& dir); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
121 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
122 //! Accepts user input a the line edit for the current directory. |
14863
3ff18e21c742
Added a few comments.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14803
diff
changeset
|
123 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
124 void accept_directory_line_edit (void); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
125 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
126 //! Set the internal variable that holds the actual octave variable. |
13495 | 127 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
128 void update_octave_directory (const QString& dir); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
129 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
130 //! Tells the widget to react on changed settings. |
14863
3ff18e21c742
Added a few comments.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14803
diff
changeset
|
131 |
31619
ad014fc78bd6
use individual local gui_settings objects
John W. Eaton <jwe@octave.org>
parents:
30757
diff
changeset
|
132 void notice_settings (void); |
22177
6e9f5408c0db
Save settings in Qt convention, delete all children in destructors (bug #45366)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
21203
diff
changeset
|
133 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
134 void save_settings (void); |
20642
3e449f43e708
revised code for header context menu in file browser
Torsten <ttl@justmail.de>
parents:
19697
diff
changeset
|
135 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
136 private slots: |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
137 |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
138 void headercontextmenu_requested (const QPoint& pos); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
139 void toggle_header (int col); |
20642
3e449f43e708
revised code for header context menu in file browser
Torsten <ttl@justmail.de>
parents:
19697
diff
changeset
|
140 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
141 //! Context menu wanted. |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
142 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
143 void contextmenu_requested (const QPoint& pos); |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
144 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
145 //! Context menu actions. |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
146 //!@{ |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
147 void contextmenu_open (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
148 void contextmenu_open_in_editor (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
149 void contextmenu_open_in_app (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
150 void contextmenu_copy_selection (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
151 void contextmenu_run (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
152 void contextmenu_load (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
153 void contextmenu_rename (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
154 void contextmenu_delete (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
155 void contextmenu_newfile (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
156 void contextmenu_newdir (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
157 void contextmenu_setcurrentdir (bool); |
27273
aaf788e496a3
add file browser context menu for removing dirs from path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27269
diff
changeset
|
158 void contextmenu_add_to_path (bool, bool rm=false, bool subdirs=false); |
27269
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
159 void contextmenu_add_to_path_subdirs (bool); |
27273
aaf788e496a3
add file browser context menu for removing dirs from path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27269
diff
changeset
|
160 void contextmenu_rm_from_path (bool); |
aaf788e496a3
add file browser context menu for removing dirs from path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27269
diff
changeset
|
161 void contextmenu_rm_from_path_subdirs (bool); |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
162 void contextmenu_findfiles (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
163 //!@} |
16503
c1ff738d606d
allow files to be renamed or deleted using the file browser
John Donoghue <john.donoghue@ieee.org>
parents:
16499
diff
changeset
|
164 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
165 //! Popdown menu options. |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
166 //!@{ |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
167 void popdownmenu_newfile (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
168 void popdownmenu_newdir (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
169 void popdownmenu_search_dir (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
170 void popdownmenu_findfiles (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
171 void popdownmenu_home (bool); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
172 //!@} |
16542
016073c0cb94
Add popdown toolbutton to files-dock-window toolbar.
John Donoghue <john.donoghue@ieee.org>
parents:
16525
diff
changeset
|
173 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
174 //! Inherited from octave_doc_widget. |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
175 //!@{ |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
176 void copyClipboard (); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
177 void pasteClipboard (); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
178 void selectAll (); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
179 //!@} |
16881
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16762
diff
changeset
|
180 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
181 private: |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
182 |
27269
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
183 //! Get currently selected QFileInfo object. |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
184 |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
185 QList<QFileInfo> get_selected_items_info (bool); |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
186 |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
187 //! Process new file/directory actions |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
188 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
189 void process_new_file (const QString& parent_name); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
190 void process_new_dir (const QString& parent_name); |
27269
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
191 |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
192 //! Process setting current dir or find in files |
6a6b5ae3d58d
add file browser context menu for adding dirs to the path (bug #55623)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
193 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
194 void process_set_current_dir (const QString& parent_name); |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
195 void process_find_files (const QString& dir_name); |
13495 | 196 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
197 //! set a new directory or open a file |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
198 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
199 void display_directory (const QString& dir, bool set_octave_dir = true); |
13495 | 200 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
201 void open_item_in_app (const QModelIndex& index); |
16594
3ce0c312a40b
contextmenu for opening files in default applications
John W. Eaton <jwe@octave.org>
parents:
16542
diff
changeset
|
202 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
203 //! Variables for the actions |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
204 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
205 QToolBar *m_navigation_tool_bar; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
206 QAction *m_sync_octave_directory_action; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
207 QAction *m_sync_browser_directory_action; |
30757
00ff0dfb4d27
renaming files and directories using inline editing
Remi Thebault <remi.thebault@gmail.com>
parents:
30564
diff
changeset
|
208 QAction *m_rename_action; |
13495 | 209 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
210 //! The file system model. |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
211 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
212 QFileSystemModel *m_file_system_model; |
13495 | 213 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
214 //! The file system view. |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
215 //!@{ |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
216 QTreeView *m_file_tree_view; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
217 QComboBox *m_current_directory; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
218 //!@} |
16498
605d7f0ee0d8
Added Filesdockwidget recently viewed directory pulldownlist
John Donoghue <john.donoghue@ieee.org>
parents:
16461
diff
changeset
|
219 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
220 //! Flag if syncing with Octave. |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
221 |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
222 bool m_sync_octave_dir; |
24014
bffd7d826887
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
223 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
224 //! The actual Octave directory. |
24014
bffd7d826887
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23920
diff
changeset
|
225 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
226 QString m_octave_dir; |
24109
1d6c940a1b37
doc: Improve Doxygen documentation for some files in libgui.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
24014
diff
changeset
|
227 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
228 enum { MaxMRUDirs = 10 }; |
16499
facf00ce97d3
gui: configurable synchronization between file browser and octave directory
Torsten <ttl@justmail.de>
parents:
16498
diff
changeset
|
229 |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
230 QStringList m_columns_shown; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
231 QStringList m_columns_shown_keys; |
25851
507cee1b684e
removed all initial preferences for file browser from pref file (bug #54606)
Torsten <mttl@mailbox.org>
parents:
25408
diff
changeset
|
232 QList <QVariant> m_columns_shown_defs; |
24733
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
233 QSignalMapper *m_sig_mapper; |
e15d53d2de1e
move more GUI classse inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
234 }; |
31646
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30757
diff
changeset
|
235 |
c6d54dd31a7e
maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents:
30757
diff
changeset
|
236 OCTAVE_END_NAMESPACE(octave) |
13495 | 237 |
20945
9d9270e2f98f
eliminate comments after preprocessor conditionals
John W. Eaton <jwe@octave.org>
parents:
20706
diff
changeset
|
238 #endif |