GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
Dock widget to display files in the current directory. More...
#include "files-dock-widget.h"
Public Slots | |
void | accept_directory_line_edit () |
Accepts user input a the line edit for the current directory. More... | |
void | change_directory_up () |
Slot for handling the up-directory button in the toolbar. More... | |
void | do_sync_browser_directory () |
Slot for handling the sync browser directory button in the toolbar. More... | |
void | do_sync_octave_directory () |
Slot for handling the sync octave directory button in the toolbar. More... | |
virtual void | focus (void) |
void | handle_active_dock_changed (octave_dock_widget *, octave_dock_widget *) |
void | handle_settings (const QSettings *) |
virtual void | handle_visibility (bool visible) |
void | item_double_clicked (const QModelIndex &index) |
Slot for handling a change in directory via double click. More... | |
QMainWindow * | main_win () |
void | notice_settings (const QSettings *settings) |
Tells the widget to react on changed settings. More... | |
void | set_current_directory (const QString &dir) |
Sets the current directory being displayed. More... | |
void | update_octave_directory (const QString &dir) |
set the internal variable that holds the actual octave variable More... | |
Signals | |
void | active_changed (bool active) |
Custom signal that tells whether a user has clicked away that dock widget, i.e the active dock widget has changed. More... | |
void | displayed_directory_changed (const QString &dir) |
Emitted, whenever the currently displayed directory changed. More... | |
void | find_files_signal (const QString &startdir) |
Emitted, whenever wants to search for a file . More... | |
void | load_file_signal (const QString &fileName) |
Emitted, whenever the user requested to load a file. More... | |
void | open_file (const QString &fileName) |
Emitted, whenever the user requested to open a file. More... | |
void | run_file_signal (const QFileInfo &info) |
Emitted, whenever the user requested to run a file. More... | |
Public Member Functions | |
files_dock_widget (QWidget *parent=0) | |
~files_dock_widget () | |
virtual void | connect_visibility_changed (void) |
void | make_widget (bool dock=true) |
void | make_window (void) |
void | set_predecessor_widget (octave_dock_widget *prev_widget) |
void | set_title (const QString &) |
Protected Slots | |
virtual void | add_actions (QList< QAction * > action_list) |
virtual void | do_undo () |
slots to handle undo More... | |
bool | eventFilter (QObject *obj, QEvent *e) |
virtual void | handle_visibility_changed (bool visible) |
Slot to steer changing visibility from outside. More... | |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *e) |
QWidget * | focusWidget () |
Private Types | |
enum | { MaxMRUDirs = 10 } |
Private Slots | |
void | contextmenu_copy_selection (bool) |
void | contextmenu_delete (bool) |
void | contextmenu_findfiles (bool) |
void | contextmenu_load (bool) |
void | contextmenu_newdir (bool) |
void | contextmenu_newfile (bool) |
void | contextmenu_open (bool) |
void | contextmenu_open_in_app (bool) |
void | contextmenu_rename (bool) |
void | contextmenu_requested (const QPoint &pos) |
context menu wanted More... | |
void | contextmenu_run (bool) |
void | contextmenu_setcurrentdir (bool) |
void | copyClipboard () |
void | headercontextmenu_requested (const QPoint &pos) |
void | pasteClipboard () |
void | popdownmenu_findfiles (bool) |
void | popdownmenu_home (bool) |
void | popdownmenu_newdir (bool) |
void | popdownmenu_newfile (bool) |
void | popdownmenu_search_dir (bool) |
void | selectAll () |
void | toggle_headercontextitem_datemodified () |
void | toggle_headercontextitem_filesize () |
void | toggle_headercontextitem_filetype () |
void | toggle_headercontextitem_showhidden () |
Private Member Functions | |
void | display_directory (const QString &dir, bool set_octave_dir=true) |
set a new directory or open a file More... | |
void | open_item_in_app (const QModelIndex &index) |
void | process_find_files (const QString &dir_name) |
void | process_new_dir (const QString &parent_name) |
void | process_new_file (const QString &parent_name) |
void | process_set_current_dir (const QString &parent_name) |
Private Attributes | |
QComboBox * | _current_directory |
QFileSystemModel * | _file_system_model |
The file system model. More... | |
QTreeView * | _file_tree_view |
The file system view. More... | |
QToolBar * | _navigation_tool_bar |
Variables for the actions. More... | |
QString | _octave_dir |
QAction * | _sync_browser_directory_action |
bool | _sync_octave_dir |
Internal variables. More... | |
QAction * | _sync_octave_directory_action |
Dock widget to display files in the current directory.
Definition at line 46 of file files-dock-widget.h.
|
private |
Enumerator | |
---|---|
MaxMRUDirs |
Definition at line 162 of file files-dock-widget.h.
files_dock_widget::files_dock_widget | ( | QWidget * | parent = 0 | ) |
Definition at line 64 of file files-dock-widget.cc.
References _current_directory, _file_system_model, _file_tree_view, _navigation_tool_bar, _octave_dir, _sync_browser_directory_action, _sync_octave_dir, _sync_octave_directory_action, accept_directory_line_edit(), change_directory_up(), contextmenu_requested(), displayed_directory_changed(), do_sync_browser_directory(), do_sync_octave_directory(), resource_manager::get_settings(), headercontextmenu_requested(), resource_manager::icon(), item_double_clicked(), octave_dock_widget::main_win(), MaxMRUDirs, open_file(), popdownmenu_findfiles(), popdownmenu_home(), popdownmenu_newdir(), popdownmenu_newfile(), popdownmenu_search_dir(), run_file_signal(), set_current_directory(), and octave_dock_widget::set_title().
files_dock_widget::~files_dock_widget | ( | ) |
Definition at line 268 of file files-dock-widget.cc.
References _current_directory, _file_tree_view, and resource_manager::get_settings().
|
slot |
Accepts user input a the line edit for the current directory.
Definition at line 303 of file files-dock-widget.cc.
References _current_directory, and display_directory().
Referenced by files_dock_widget().
|
signalinherited |
Custom signal that tells whether a user has clicked away that dock widget, i.e the active dock widget has changed.
Definition at line 143 of file moc-octave-dock-widget.cc.
Referenced by octave_dock_widget::change_visibility(), octave_dock_widget::closeEvent(), workspace_view::closeEvent(), octave_dock_widget::connect_visibility_changed(), and octave_dock_widget::handle_visibility_changed().
|
protectedvirtualslotinherited |
Definition at line 485 of file octave-dock-widget.cc.
Referenced by octave_dock_widget::octave_dock_widget().
|
slot |
Slot for handling the up-directory button in the toolbar.
Definition at line 309 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and display_directory().
Referenced by files_dock_widget().
|
protectedvirtualinherited |
Reimplemented in workspace_view.
Definition at line 493 of file octave-dock-widget.cc.
References octave_dock_widget::active_changed(), and octave_dock_widget::set_focus_predecessor().
|
virtualinherited |
Definition at line 154 of file octave-dock-widget.cc.
References octave_dock_widget::active_changed(), and octave_dock_widget::handle_visibility().
Referenced by main_window::connect_visibility_changed().
|
privateslot |
Definition at line 580 of file files-dock-widget.cc.
References _file_system_model, and _file_tree_view.
Referenced by contextmenu_requested(), and copyClipboard().
|
privateslot |
Definition at line 661 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and warning().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 756 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_find_files().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 600 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and load_file_signal().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 720 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_new_dir().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 703 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_new_file().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 550 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, open_file(), and set_current_directory().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 570 of file files-dock-widget.cc.
References _file_tree_view, and open_item_in_app().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 631 of file files-dock-widget.cc.
References _file_system_model, and _file_tree_view.
Referenced by contextmenu_requested().
|
privateslot |
context menu wanted
Definition at line 476 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, contextmenu_copy_selection(), contextmenu_delete(), contextmenu_findfiles(), contextmenu_load(), contextmenu_newdir(), contextmenu_newfile(), contextmenu_open(), contextmenu_open_in_app(), contextmenu_rename(), contextmenu_run(), contextmenu_setcurrentdir(), and resource_manager::icon().
Referenced by files_dock_widget().
|
privateslot |
Definition at line 616 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and run_file_signal().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 737 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_set_current_dir().
Referenced by contextmenu_requested().
|
privateslot |
Definition at line 907 of file files-dock-widget.cc.
References _current_directory, _file_tree_view, and contextmenu_copy_selection().
|
private |
set a new directory or open a file
Definition at line 342 of file files-dock-widget.cc.
References _current_directory, _file_system_model, _file_tree_view, _sync_octave_dir, is_octave_data_file(), load_file_signal(), open_file(), and process_set_current_dir().
Referenced by accept_directory_line_edit(), change_directory_up(), do_sync_browser_directory(), notice_settings(), set_current_directory(), and update_octave_directory().
|
signal |
Emitted, whenever the currently displayed directory changed.
Definition at line 214 of file moc-files-dock-widget.cc.
Referenced by do_sync_octave_directory(), files_dock_widget(), and process_set_current_dir().
|
slot |
Slot for handling the sync browser directory button in the toolbar.
Definition at line 328 of file files-dock-widget.cc.
References _octave_dir, and display_directory().
Referenced by files_dock_widget().
|
slot |
Slot for handling the sync octave directory button in the toolbar.
Definition at line 319 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and displayed_directory_changed().
Referenced by files_dock_widget().
|
inlineprotectedvirtualslotinherited |
slots to handle undo
Definition at line 100 of file octave-dock-widget.h.
Referenced by octave_dock_widget::octave_dock_widget().
Definition at line 455 of file octave-dock-widget.cc.
|
signal |
Emitted, whenever wants to search for a file .
Definition at line 235 of file moc-files-dock-widget.cc.
Referenced by process_find_files().
|
inlinevirtualslotinherited |
Reimplemented in terminal_dock_widget.
Definition at line 62 of file octave-dock-widget.h.
Referenced by octave_dock_widget::change_floating(), terminal_dock_widget::focus(), octave_dock_widget::handle_visibility(), and octave_dock_widget::set_focus_predecessor().
|
protectedinherited |
Definition at line 311 of file octave-dock-widget.cc.
References Faddeeva::w().
|
slotinherited |
Definition at line 467 of file octave-dock-widget.cc.
References octave_dock_widget::_custom_style, and octave_dock_widget::set_style().
Referenced by octave_dock_widget::octave_dock_widget().
|
slotinherited |
Definition at line 415 of file octave-dock-widget.cc.
References octave_dock_widget::_bg_color, octave_dock_widget::_bg_color_active, octave_dock_widget::_custom_style, octave_dock_widget::_fg_color, octave_dock_widget::_fg_color_active, octave_dock_widget::_icon_color, octave_dock_widget::_icon_color_active, octave_dock_widget::_title_3d, octave_dock_widget::notice_settings(), and octave_dock_widget::set_style().
Referenced by octave_dock_widget::octave_dock_widget().
|
inlinevirtualslotinherited |
Definition at line 72 of file octave-dock-widget.h.
References octave_dock_widget::focus().
Referenced by octave_dock_widget::connect_visibility_changed().
|
inlineprotectedvirtualslotinherited |
Slot to steer changing visibility from outside.
Definition at line 90 of file octave-dock-widget.h.
References octave_dock_widget::active_changed().
Referenced by octave_dock_widget::octave_dock_widget().
|
privateslot |
Definition at line 434 of file files-dock-widget.cc.
References _file_tree_view, resource_manager::get_settings(), toggle_headercontextitem_datemodified(), toggle_headercontextitem_filesize(), toggle_headercontextitem_filetype(), and toggle_headercontextitem_showhidden().
Referenced by files_dock_widget().
|
slot |
Slot for handling a change in directory via double click.
Definition at line 289 of file files-dock-widget.cc.
References _file_system_model, and set_current_directory().
Referenced by files_dock_widget().
|
signal |
Emitted, whenever the user requested to load a file.
Definition at line 221 of file moc-files-dock-widget.cc.
Referenced by contextmenu_load(), and display_directory().
|
inlineslotinherited |
Definition at line 85 of file octave-dock-widget.h.
References octave_dock_widget::_parent.
Referenced by files_dock_widget().
|
inherited |
Definition at line 238 of file octave-dock-widget.cc.
References octave_dock_widget::_floating, octave_dock_widget::_icon_color, octave_dock_widget::_parent, and resource_manager::get_settings().
Referenced by octave_dock_widget::change_floating(), and main_window::set_window_layout().
|
inherited |
Definition at line 195 of file octave-dock-widget.cc.
References octave_dock_widget::_floating, octave_dock_widget::_icon_color, octave_dock_widget::_parent, resource_manager::get_settings(), and octave_dock_widget::set_focus_predecessor().
Referenced by octave_dock_widget::change_floating(), and main_window::set_window_layout().
|
slot |
Tells the widget to react on changed settings.
Definition at line 775 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, _navigation_tool_bar, _octave_dir, _sync_browser_directory_action, _sync_octave_dir, _sync_octave_directory_action, and display_directory().
Referenced by toggle_headercontextitem_datemodified(), toggle_headercontextitem_filesize(), toggle_headercontextitem_filetype(), and toggle_headercontextitem_showhidden().
|
signal |
Emitted, whenever the user requested to open a file.
Definition at line 207 of file moc-files-dock-widget.cc.
Referenced by contextmenu_open(), display_directory(), and files_dock_widget().
|
private |
Definition at line 383 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_open_in_app().
|
privateslot |
Definition at line 924 of file files-dock-widget.cc.
References _current_directory.
|
privateslot |
Definition at line 845 of file files-dock-widget.cc.
References _file_system_model, and process_find_files().
Referenced by files_dock_widget().
|
privateslot |
Definition at line 824 of file files-dock-widget.cc.
References QtHandles::Utils::fromStdString(), octave_env::get_home_directory(), and set_current_directory().
Referenced by files_dock_widget().
|
privateslot |
Definition at line 851 of file files-dock-widget.cc.
References _file_system_model, and process_new_dir().
Referenced by files_dock_widget().
|
privateslot |
Definition at line 857 of file files-dock-widget.cc.
References _file_system_model, and process_new_file().
Referenced by files_dock_widget().
|
privateslot |
Definition at line 835 of file files-dock-widget.cc.
References _file_system_model, and set_current_directory().
Referenced by files_dock_widget().
|
private |
Definition at line 901 of file files-dock-widget.cc.
References find_files_signal().
Referenced by contextmenu_findfiles(), and popdownmenu_findfiles().
|
private |
Definition at line 881 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_newdir(), and popdownmenu_newdir().
|
private |
Definition at line 863 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_newfile(), and popdownmenu_newfile().
|
private |
Definition at line 896 of file files-dock-widget.cc.
References displayed_directory_changed().
Referenced by contextmenu_setcurrentdir(), and display_directory().
|
signal |
Emitted, whenever the user requested to run a file.
Definition at line 228 of file moc-files-dock-widget.cc.
Referenced by contextmenu_run(), and files_dock_widget().
|
privateslot |
Definition at line 937 of file files-dock-widget.cc.
References _current_directory, and _file_tree_view.
|
slot |
Sets the current directory being displayed.
Definition at line 297 of file files-dock-widget.cc.
References display_directory().
Referenced by contextmenu_open(), files_dock_widget(), item_double_clicked(), popdownmenu_home(), and popdownmenu_search_dir().
|
inherited |
Definition at line 164 of file octave-dock-widget.cc.
References octave_dock_widget::_predecessor_widget.
Referenced by main_window::focus_changed().
|
inherited |
Definition at line 171 of file octave-dock-widget.cc.
Referenced by history_dock_widget::construct(), documentation_dock_widget::documentation_dock_widget(), files_dock_widget(), terminal_dock_widget::terminal_dock_widget(), and workspace_view::workspace_view().
|
privateslot |
Definition at line 413 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 393 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 403 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 423 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
slot |
set the internal variable that holds the actual octave variable
Definition at line 334 of file files-dock-widget.cc.
References _octave_dir, _sync_octave_dir, and display_directory().
|
private |
Definition at line 156 of file files-dock-widget.h.
Referenced by accept_directory_line_edit(), copyClipboard(), display_directory(), files_dock_widget(), pasteClipboard(), selectAll(), and ~files_dock_widget().
|
private |
The file system model.
Definition at line 152 of file files-dock-widget.h.
Referenced by change_directory_up(), contextmenu_copy_selection(), contextmenu_delete(), contextmenu_findfiles(), contextmenu_load(), contextmenu_newdir(), contextmenu_newfile(), contextmenu_open(), contextmenu_rename(), contextmenu_requested(), contextmenu_run(), contextmenu_setcurrentdir(), display_directory(), do_sync_octave_directory(), files_dock_widget(), item_double_clicked(), notice_settings(), open_item_in_app(), popdownmenu_findfiles(), popdownmenu_newdir(), popdownmenu_newfile(), popdownmenu_search_dir(), process_new_dir(), and process_new_file().
|
private |
The file system view.
Definition at line 155 of file files-dock-widget.h.
Referenced by change_directory_up(), contextmenu_copy_selection(), contextmenu_delete(), contextmenu_findfiles(), contextmenu_load(), contextmenu_newdir(), contextmenu_newfile(), contextmenu_open(), contextmenu_open_in_app(), contextmenu_rename(), contextmenu_requested(), contextmenu_run(), contextmenu_setcurrentdir(), copyClipboard(), display_directory(), do_sync_octave_directory(), files_dock_widget(), headercontextmenu_requested(), notice_settings(), selectAll(), and ~files_dock_widget().
|
private |
Variables for the actions.
Definition at line 147 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().
|
private |
Definition at line 160 of file files-dock-widget.h.
Referenced by do_sync_browser_directory(), files_dock_widget(), notice_settings(), and update_octave_directory().
|
private |
Definition at line 149 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().
|
private |
Internal variables.
Definition at line 159 of file files-dock-widget.h.
Referenced by display_directory(), files_dock_widget(), notice_settings(), and update_octave_directory().
|
private |
Definition at line 148 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().