comparison libgui/qterminal/libqterminal/QTerminal.h @ 16718:0495339998f8

context menu of terminal widget: add icons and an entry to clear the console * QTerminal.h(constructor): add context menu to clear the console using the related slot of main_window, add icons for copy and paste menu entries
author Torsten <ttl@justmail.de>
date Sun, 02 Jun 2013 11:10:16 +0200
parents 591cb51c18a3
children 1d1f02e0f6b4
comparison
equal deleted inserted replaced
16717:9ad6e7d4fa42 16718:0495339998f8
100 { 100 {
101 setContextMenuPolicy (Qt::CustomContextMenu); 101 setContextMenuPolicy (Qt::CustomContextMenu);
102 102
103 _contextMenu = new QMenu (this); 103 _contextMenu = new QMenu (this);
104 104
105 QAction *copyAction 105 _contextMenu->addAction (QIcon (":/actions/icons/editcopy.png"),
106 = _contextMenu->addAction (tr ("Copy"), 106 tr ("Copy"), this, SLOT (copyClipboard ()));
107 this, SLOT (copyClipboard ()));
108 107
109 QAction *pasteAction 108 _contextMenu->addAction (QIcon (":/actions/icons/editpaste.png"),
110 = _contextMenu->addAction (tr ("Paste"), 109 tr ("Paste"), this, SLOT (pasteClipboard ()));
111 this, SLOT (pasteClipboard ())); 110
111 _contextMenu->addSeparator ();
112
113 _contextMenu->addAction (tr ("Clear All"), parent (),
114 SLOT (handle_clear_command_window_request ()));
112 115
113 connect (this, SIGNAL (customContextMenuRequested (QPoint)), 116 connect (this, SIGNAL (customContextMenuRequested (QPoint)),
114 this, SLOT (handleCustomContextMenuRequested (QPoint))); 117 this, SLOT (handleCustomContextMenuRequested (QPoint)));
115 118
116 connect (this, SIGNAL (report_status_message (const QString&)), 119 connect (this, SIGNAL (report_status_message (const QString&)),