Mercurial > octave
diff libgui/src/m-editor/file-editor.h @ 16558:5fc1ce2947bd
style fixes
* file-editor.h, file-editor.cc, file-editor-tab.h,
file-editor-tab.cc: Style fixes.
(file_editor_tab::editor_markers): Declare enum inside file_editor
class instead of in global scope.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 23 Apr 2013 21:43:25 -0400 |
parents | c1e90c7cfd30 |
children | 662a712b8fd5 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.h Tue Apr 23 20:26:07 2013 -0400 +++ b/libgui/src/m-editor/file-editor.h Tue Apr 23 21:43:25 2013 -0400 @@ -36,13 +36,6 @@ #include "file-editor-interface.h" #include "file-editor-tab.h" -enum editor_markers - { - bookmark, - breakpoint, - debugger_position - }; - class file_editor : public file_editor_interface { Q_OBJECT @@ -53,27 +46,29 @@ typedef std::map<QString, QWidget *>::const_iterator editor_tab_map_const_iterator; file_editor (QWidget *p); - ~file_editor (); + ~file_editor (void); void connect_visibility_changed (void); void loadFile (const QString& fileName); - QMenu * get_mru_menu ( ) { return _mru_file_menu; } - QMenu * debug_menu (); - QToolBar * toolbar (); + QMenu *get_mru_menu (void) { return _mru_file_menu; } + QMenu *debug_menu (void); + QToolBar *toolbar (void); - void set_focus (); + void set_focus (void); void handle_enter_debug_mode (void); void handle_exit_debug_mode (void); signals: + void fetab_settings_changed (const QSettings *settings); void fetab_close_request (const QWidget* ID); void fetab_change_request (const QWidget* ID); void fetab_file_name_query (const QWidget* ID); // Save is a ping-pong type of communication - void fetab_save_file (const QWidget* ID, const QString& fileName, bool remove_on_success); + void fetab_save_file (const QWidget* ID, const QString& fileName, + bool remove_on_success); // No fetab_open, functionality in editor // No fetab_new, functionality in editor void fetab_undo (const QWidget* ID); @@ -99,7 +94,8 @@ void fetab_goto_line (const QWidget* ID, int line = -1); void fetab_insert_debugger_pointer (const QWidget* ID, int line = -1); void fetab_delete_debugger_pointer (const QWidget* ID, int line = -1); - void fetab_do_breakpoint_marker (bool insert, const QWidget* ID, int line = -1); + void fetab_do_breakpoint_marker (bool insert, const QWidget* ID, + int line = -1); void fetab_set_focus (const QWidget* ID); public slots: @@ -107,37 +103,38 @@ void handle_visibility (bool visible); void request_new_file (const QString& commands); - void request_open_file (); - void request_mru_open_file (); - void request_print_file (); + void request_open_file (void); + void request_mru_open_file (void); + void request_print_file (void); - void request_undo (); - void request_redo (); - void request_copy (); - void request_cut (); - void request_paste (); - void request_save_file (); - void request_save_file_as (); - void request_run_file (); - void request_toggle_bookmark (); - void request_next_bookmark (); - void request_previous_bookmark (); - void request_remove_bookmark (); + void request_undo (void); + void request_redo (void); + void request_copy (void); + void request_cut (void); + void request_paste (void); + void request_save_file (void); + void request_save_file_as (void); + void request_run_file (void); + void request_toggle_bookmark (void); + void request_next_bookmark (void); + void request_previous_bookmark (void); + void request_remove_bookmark (void); - void request_toggle_breakpoint (); - void request_next_breakpoint (); - void request_previous_breakpoint (); - void request_remove_breakpoint (); + void request_toggle_breakpoint (void); + void request_next_breakpoint (void); + void request_previous_breakpoint (void); + void request_remove_breakpoint (void); - void request_comment_selected_text (); - void request_uncomment_selected_text (); - void request_find (); + void request_comment_selected_text (void); + void request_uncomment_selected_text (void); + void request_find (void); - void request_goto_line (); + void request_goto_line (void); - void handle_file_name_changed (const QString& fileName, const QString& toolTip); + void handle_file_name_changed (const QString& fileName, + const QString& toolTip); void handle_tab_close_request (int index); - void handle_tab_remove_request (); + void handle_tab_remove_request (void); void handle_add_filename_to_list (const QString& fileName, QWidget *ID); void active_tab_changed (int index); void handle_editor_state_changed (bool enableCopy, const QString& fileName); @@ -146,23 +143,26 @@ void handle_insert_debugger_pointer_request (const QString& file, int line); void handle_delete_debugger_pointer_request (const QString& file, int line); - void handle_update_breakpoint_marker_request (bool insert, const QString& file, - int line); + void handle_update_breakpoint_marker_request (bool insert, + const QString& file, int line); + void handle_edit_file_request (const QString& file); - /** Tells the editor to react on changed settings. */ + // Tells the editor to react on changed settings. void notice_settings (const QSettings *settings); private slots: + void request_open_file (const QString& fileName, int line = -1, bool debug_pointer = false, bool breakpoint_marker = false, bool insert = true); private: - void construct (); - void add_file_editor_tab(file_editor_tab *f, const QString &fn); + + void construct (void); + void add_file_editor_tab (file_editor_tab *f, const QString& fn); void save_file_as (QWidget *fetabID = 0); - void mru_menu_update (); + void mru_menu_update (void); QWidget *find_tab_widget (const QString& openFileName) const; @@ -170,14 +170,14 @@ QString ced; - QMenuBar * _menu_bar; - QToolBar * _tool_bar; - QMenu * _debug_menu; - QAction * _copy_action; - QAction * _cut_action; - QAction * _run_action; - QTabWidget * _tab_widget; - int _marker_breakpoint; + QMenuBar *_menu_bar; + QToolBar *_tool_bar; + QMenu *_debug_menu; + QAction *_copy_action; + QAction *_cut_action; + QAction *_run_action; + QTabWidget *_tab_widget; + int _marker_breakpoint; enum { MaxMRUFiles = 10 }; QMenu *_mru_file_menu;