Mercurial > hg > octave-lyh
comparison libgui/src/files-dock-widget.h @ 16504:49b059bf27c7
allow loading files from file browser
* files-dock-widget.h, files-dock-widget.cc
(files_dock_widget::contextmenu_requested): Create menu item for
loading files.
(files_dock_widget::contextmenu_load): New function.
(files_dock_widget::load_file_signal): New signal.
* main-window.h, main-window.cc (main_window::construct): Connect
file_browser_window::load_file_signal to
main_window::handle_load_workspace_request.
(main_window::load_workspace_callback): Update workspace after
loading file.
(main_window::handle_load_workspace_request): New argument for passing
file name.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 12 Apr 2013 14:51:47 -0400 |
parents | c1ff738d606d |
children | 8a4960f2c7c3 |
comparison
equal
deleted
inserted
replaced
16503:c1ff738d606d | 16504:49b059bf27c7 |
---|---|
83 /** context menu wanted */ | 83 /** context menu wanted */ |
84 void contextmenu_requested (const QPoint& pos); | 84 void contextmenu_requested (const QPoint& pos); |
85 | 85 |
86 /* context menu actions */ | 86 /* context menu actions */ |
87 void contextmenu_open (bool); | 87 void contextmenu_open (bool); |
88 void contextmenu_load (bool); | |
88 void contextmenu_rename (bool); | 89 void contextmenu_rename (bool); |
89 void contextmenu_delete (bool); | 90 void contextmenu_delete (bool); |
90 void contextmenu_newfile (bool); | 91 void contextmenu_newfile (bool); |
91 void contextmenu_newdir (bool); | 92 void contextmenu_newdir (bool); |
92 | 93 |
95 /** Emitted, whenever the user requested to open a file. */ | 96 /** Emitted, whenever the user requested to open a file. */ |
96 void open_file (const QString& fileName); | 97 void open_file (const QString& fileName); |
97 | 98 |
98 /** Emitted, whenever the currently displayed directory changed. */ | 99 /** Emitted, whenever the currently displayed directory changed. */ |
99 void displayed_directory_changed (const QString& dir); | 100 void displayed_directory_changed (const QString& dir); |
101 | |
102 /** Emitted, whenever the user requested to load a file. */ | |
103 void load_file_signal (const QString& fileName); | |
100 | 104 |
101 private: | 105 private: |
102 | 106 |
103 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc | 107 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc |
104 | 108 |