Mercurial > octave-nkf
diff libgui/src/workspace-view.h @ 16462:8c666c7b0e5d
Added context menu to workspace variable display
* libgui/src/workspace-view.h, libgui/src/workspace-view.cc
(workspace_view::workspace_view): Connect signals for context menu.
(workspace_view::contextmenu_requested,
workspace_view::handle_contextmenu_disp,
workspace_view::handle_contextmenu_plot,
workspace_view::handle_contextmenu_stem): New slot functions.
(workspace_view::relay_contextmenu_command): New function.
(workspace_view::command_requested): New signal.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 07 Apr 2013 15:48:11 -0400 |
parents | cbc39a3d0c42 |
children | 8e2a853cdd7d |
line wrap: on
line diff
--- a/libgui/src/workspace-view.h Sun Apr 07 12:36:07 2013 -0400 +++ b/libgui/src/workspace-view.h Sun Apr 07 15:48:11 2013 -0400 @@ -59,6 +59,8 @@ signals: /** Custom signal that tells if a user has clicke away that dock widget. */ void active_changed (bool active); + /** signal that user had requested a command on a variable */ + void command_requested (const QString& cmd); protected: void closeEvent (QCloseEvent *event); @@ -67,8 +69,14 @@ void collapse_requested (QModelIndex index); void expand_requested (QModelIndex index); void item_double_clicked (QModelIndex index); + void contextmenu_requested (const QPoint& pos); + // context menu slots + void handle_contextmenu_disp (); + void handle_contextmenu_plot (); + void handle_contextmenu_stem (); +private: + void relay_contextmenu_command (const QString& cmdname); -private: QTreeView *view; struct