Mercurial > octave-libgccjit
diff gui/src/m-editor/file-editor.cc @ 15106:59175df7dcf6 gui
Created and added debug action icons.
* bp_next.png: Added icon.
* bp_prev.png: Added icon.
* bp_rm_all.png: Added icon.
* bp_toggle.png: Added icon.
* db_cont.png: Added icon.
* db_step.png: Added icon.
* db_step_in.png: Added icon.
* db_step_out.png: Added icon.
* db_stop.png: Added icon.
* file-editor-interface.h: Added method for accessing the editor's toolbar.
* file-editor: Implemented new interface methods. Assigned icons.
* main-window.cc: Now adding debug actions to toolbar.
* resource.qrc: Added new icons to resource file.
author | Jacob Dawid <jacob.dawid@gmail.com> |
---|---|
date | Sat, 04 Aug 2012 20:22:26 +0200 |
parents | f4ea22ef2beb |
children |
line wrap: on
line diff
--- a/gui/src/m-editor/file-editor.cc Sat Aug 04 11:18:20 2012 +0200 +++ b/gui/src/m-editor/file-editor.cc Sat Aug 04 20:22:26 2012 +0200 @@ -57,6 +57,12 @@ return _debug_menu; } +QToolBar * +file_editor::toolbar () +{ + return _tool_bar; +} + void file_editor::handle_entered_debug_mode () { @@ -337,7 +343,6 @@ _tab_widget = new QTabWidget (widget); _tab_widget->setTabsClosable (true); - // Theme icons with QStyle icons as fallback QAction *new_action = new QAction (QIcon(":/actions/icons/filenew.png"), tr("&New File"), _tool_bar); @@ -371,10 +376,18 @@ QAction *toggle_bookmark_action = new QAction (tr ("Toggle &Bookmark"),_tool_bar); QAction *remove_bookmark_action = new QAction (tr ("&Remove All Bookmarks"),_tool_bar); - QAction *next_breakpoint_action = new QAction (tr ("&Next breakpoint"),_tool_bar); - QAction *previous_breakpoint_action = new QAction (tr ("Pre&vious breakpoint"),_tool_bar); - QAction *toggle_breakpoint_action = new QAction (tr ("Toggle &breakpoint"),_tool_bar); - QAction *remove_breakpoint_action = new QAction (tr ("&Remove All breakpoints"),_tool_bar); + QAction *next_breakpoint_action + = new QAction (QIcon (":/actions/icons/bp_next.png"), + tr ("&Next breakpoint"), _tool_bar); + QAction *previous_breakpoint_action + = new QAction (QIcon (":/actions/icons/bp_prev.png"), + tr ("Pre&vious breakpoint"), _tool_bar); + QAction *toggle_breakpoint_action + = new QAction (QIcon (":/actions/icons/bp_toggle.png"), + tr ("Toggle &breakpoint"), _tool_bar); + QAction *remove_all_breakpoints_action + = new QAction (QIcon (":/actions/icons/bp_rm_all.png"), + tr ("&Remove All breakpoints"), _tool_bar); QAction *comment_selection_action = new QAction (tr ("&Comment Selected Text"),_tool_bar); QAction *uncomment_selection_action = new QAction (tr ("&Uncomment Selected Text"),_tool_bar); @@ -413,10 +426,15 @@ _tool_bar->addAction (redo_action); _tool_bar->addAction (_copy_action); _tool_bar->addAction (_cut_action); + _tool_bar->addAction (paste_action); _tool_bar->addSeparator (); - _tool_bar->addAction (paste_action); _tool_bar->addAction (find_action); _tool_bar->addAction (_run_action); + _tool_bar->addSeparator (); + _tool_bar->addAction (toggle_breakpoint_action); + _tool_bar->addAction (next_breakpoint_action); + _tool_bar->addAction (previous_breakpoint_action); + _tool_bar->addAction (remove_all_breakpoints_action); // menu bar QMenu *fileMenu = new QMenu (tr ("&File"), _menu_bar); @@ -450,7 +468,7 @@ _debug_menu->addAction (toggle_breakpoint_action); _debug_menu->addAction (next_breakpoint_action); _debug_menu->addAction (previous_breakpoint_action); - _debug_menu->addAction (remove_breakpoint_action); + _debug_menu->addAction (remove_all_breakpoints_action); _debug_menu->addSeparator (); // The other debug actions will be added by the main window. _menu_bar->addMenu (_debug_menu); @@ -501,7 +519,7 @@ SIGNAL (triggered ()), this, SLOT (request_next_breakpoint ())); connect (previous_breakpoint_action, SIGNAL (triggered ()), this, SLOT (request_previous_breakpoint ())); - connect (remove_breakpoint_action, + connect (remove_all_breakpoints_action, SIGNAL (triggered ()), this, SLOT (request_remove_breakpoint ())); connect (comment_selection_action, SIGNAL (triggered ()), this, SLOT (request_comment_selected_text ()));