GNU Octave
3.8.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. | |
void | change_directory_up () |
Slot for handling the up-directory button in the toolbar. | |
void | do_sync_browser_directory () |
Slot for handling the sync browser directory button in the toolbar. | |
void | do_sync_octave_directory () |
Slot for handling the sync octave directory button in the toolbar. | |
virtual void | focus (void) |
virtual void | handle_visibility (bool visible) |
void | item_double_clicked (const QModelIndex &index) |
Slot for handling a change in directory via double click. | |
QMainWindow * | main_win () |
void | notice_settings (const QSettings *settings) |
Tells the widget to react on changed settings. | |
void | set_current_directory (const QString &dir) |
Sets the current directory being displayed. | |
void | update_octave_directory (const QString &dir) |
set the internal variable that holds the actual octave variable |
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. | |
void | displayed_directory_changed (const QString &dir) |
Emitted, whenever the currently displayed directory changed. | |
void | find_files_signal (const QString &startdir) |
Emitted, whenever wants to search for a file . | |
void | load_file_signal (const QString &fileName) |
Emitted, whenever the user requested to load a file. | |
void | open_file (const QString &fileName) |
Emitted, whenever the user requested to open a file. | |
void | run_file_signal (const QFileInfo &info) |
Emitted, whenever the user requested to run a file. |
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_title (const QString &) |
Protected Slots | |
virtual void | handle_visibility_changed (bool visible) |
Slot to steer changing visibility from outside. |
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 | |
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 | 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 | |
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. | |
QTreeView * | _file_tree_view |
The file system view. | |
QToolBar * | _navigation_tool_bar |
Variables for the actions. | |
QString | _octave_dir |
QAction * | _sync_browser_directory_action |
bool | _sync_octave_dir |
Internal variables. | |
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 |
Definition at line 161 of file files-dock-widget.h.
files_dock_widget::files_dock_widget | ( | QWidget * | parent = 0 | ) |
Definition at line 63 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(), 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 244 of file files-dock-widget.cc.
References _current_directory, _file_tree_view, and resource_manager::get_settings().
Accepts user input a the line edit for the current directory.
Definition at line 279 of file files-dock-widget.cc.
References _current_directory, and display_directory().
Referenced by files_dock_widget().
Custom signal that tells whether a user has clicked away that dock widget, i.e the active dock widget has changed.
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().
Slot for handling the up-directory button in the toolbar.
Definition at line 285 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and display_directory().
Referenced by files_dock_widget().
|
inlineprotectedvirtualinherited |
Reimplemented in workspace_view.
Definition at line 55 of file octave-dock-widget.h.
References octave_dock_widget::active_changed().
Definition at line 134 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().
Definition at line 536 of file files-dock-widget.cc.
References _file_system_model, and _file_tree_view.
Referenced by contextmenu_requested(), and copyClipboard().
Definition at line 617 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and warning().
Referenced by contextmenu_requested().
Definition at line 712 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_find_files().
Referenced by contextmenu_requested().
Definition at line 556 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and load_file_signal().
Referenced by contextmenu_requested().
Definition at line 676 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_new_dir().
Referenced by contextmenu_requested().
Definition at line 659 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_new_file().
Referenced by contextmenu_requested().
Definition at line 513 of file files-dock-widget.cc.
References _file_tree_view, and item_double_clicked().
Referenced by contextmenu_requested().
Definition at line 526 of file files-dock-widget.cc.
References _file_tree_view, and open_item_in_app().
Referenced by contextmenu_requested().
Definition at line 587 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 452 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(), and contextmenu_setcurrentdir().
Referenced by files_dock_widget().
Definition at line 572 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and run_file_signal().
Referenced by contextmenu_requested().
Definition at line 693 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and process_set_current_dir().
Referenced by contextmenu_requested().
Definition at line 857 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 318 of file files-dock-widget.cc.
References _current_directory, _file_system_model, _file_tree_view, _sync_octave_dir, exists(), 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.
Referenced by do_sync_octave_directory(), files_dock_widget(), and process_set_current_dir().
Slot for handling the sync browser directory button in the toolbar.
Definition at line 304 of file files-dock-widget.cc.
References _octave_dir, and display_directory().
Referenced by files_dock_widget().
Slot for handling the sync octave directory button in the toolbar.
Definition at line 295 of file files-dock-widget.cc.
References _file_system_model, _file_tree_view, and displayed_directory_changed().
Referenced by files_dock_widget().
|
signal |
Emitted, whenever wants to search for a file .
Referenced by process_find_files().
Reimplemented in terminal_dock_widget.
Definition at line 65 of file octave-dock-widget.h.
Referenced by octave_dock_widget::change_floating(), and octave_dock_widget::handle_visibility().
|
protectedinherited |
Definition at line 259 of file octave-dock-widget.cc.
References Faddeeva::w().
Definition at line 75 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 410 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 265 of file files-dock-widget.cc.
References _file_system_model, and set_current_directory().
Referenced by contextmenu_open(), and files_dock_widget().
|
signal |
Emitted, whenever the user requested to load a file.
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().
Definition at line 193 of file octave-dock-widget.cc.
References octave_dock_widget::_dock_action, octave_dock_widget::_floating, octave_dock_widget::_parent, and resource_manager::get_settings().
Referenced by octave_dock_widget::change_floating(), and main_window::set_window_layout().
Definition at line 157 of file octave-dock-widget.cc.
References octave_dock_widget::_dock_action, octave_dock_widget::_floating, octave_dock_widget::_parent, and resource_manager::get_settings().
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 731 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.
Referenced by display_directory(), and files_dock_widget().
|
private |
Definition at line 359 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_open_in_app().
Definition at line 874 of file files-dock-widget.cc.
References _current_directory.
Definition at line 794 of file files-dock-widget.cc.
References _file_system_model, and process_find_files().
Referenced by files_dock_widget().
Definition at line 774 of file files-dock-widget.cc.
References set_current_directory().
Referenced by files_dock_widget().
Definition at line 800 of file files-dock-widget.cc.
References _file_system_model, and process_new_dir().
Referenced by files_dock_widget().
Definition at line 806 of file files-dock-widget.cc.
References _file_system_model, and process_new_file().
Referenced by files_dock_widget().
Definition at line 784 of file files-dock-widget.cc.
References _file_system_model, and set_current_directory().
Referenced by files_dock_widget().
|
private |
Definition at line 851 of file files-dock-widget.cc.
References find_files_signal().
Referenced by contextmenu_findfiles(), and popdownmenu_findfiles().
|
private |
Definition at line 830 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_newdir(), and popdownmenu_newdir().
|
private |
Definition at line 812 of file files-dock-widget.cc.
References _file_system_model.
Referenced by contextmenu_newfile(), and popdownmenu_newfile().
|
private |
Definition at line 846 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.
Referenced by contextmenu_run(), and files_dock_widget().
|
slot |
Sets the current directory being displayed.
Definition at line 273 of file files-dock-widget.cc.
References display_directory().
Referenced by files_dock_widget(), item_double_clicked(), popdownmenu_home(), and popdownmenu_search_dir().
|
inherited |
Definition at line 144 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 389 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 369 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 379 of file files-dock-widget.cc.
References resource_manager::get_settings(), and notice_settings().
Referenced by headercontextmenu_requested().
|
privateslot |
Definition at line 399 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 310 of file files-dock-widget.cc.
References _octave_dir, _sync_octave_dir, and display_directory().
Referenced by main_window::change_directory().
|
private |
Definition at line 155 of file files-dock-widget.h.
Referenced by accept_directory_line_edit(), copyClipboard(), display_directory(), files_dock_widget(), pasteClipboard(), and ~files_dock_widget().
|
private |
The file system model.
Definition at line 151 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_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 154 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(), and ~files_dock_widget().
|
private |
Variables for the actions.
Definition at line 146 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().
|
private |
Definition at line 159 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 148 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().
|
private |
Internal variables.
Definition at line 158 of file files-dock-widget.h.
Referenced by display_directory(), files_dock_widget(), notice_settings(), and update_octave_directory().
|
private |
Definition at line 147 of file files-dock-widget.h.
Referenced by files_dock_widget(), and notice_settings().