Mercurial > octave-nkf
comparison libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp @ 18568:2d5d0d86432e gui-release
gui: Add select all menu (Bug #41797)
* libgui//qterminal/libqterminal/QTerminal.h: Add selectAll popup menu and virtual function.
* libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp,h: Add selectAll function.
* libgui/qterminal/libqterminal/unix/TerminalView.cpp,h: add selectAll function.
* libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp,h: Add selectAll function.
* libgui/src/documentation-dock-widget.cc,h: Add selectAll function.
* libgui/src/files-dock-widget.cc,h: Add selectAll function.
* libgui/src/history-dock-widget.cc,h: Add selectAll function.
* libgui/src/m-editor/file-editor-tab.cc,h: Add select_all function and signal.
* libgui/src/m-editor/file-editor.cc,h: Add request_selectall and selectAll function, add Edit->select all menu.
* libgui/src/main-window.cc: add selectAll function, selectAll menu.
* libgui/src/octave-dock-widget.cc,h: Add virtual selectAll function and connect to mainwindow selectall signal.
* libgui/src/qtinfo/webinfo.cc,h: Add selectAll function.
* libgui/src/workspace-view.cc,h: Add selectAll function.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 11 Mar 2014 19:27:23 -0400 |
parents | 8449cc186059 |
children | 6e81b59d657c |
comparison
equal
deleted
inserted
replaced
18551:de76baa76aa1 | 18568:2d5d0d86432e |
---|---|
181 void updateConsoleView (bool grab = true); | 181 void updateConsoleView (bool grab = true); |
182 void monitorConsole (void); | 182 void monitorConsole (void); |
183 void startCommand (void); | 183 void startCommand (void); |
184 void sendConsoleText (const QString& s); | 184 void sendConsoleText (const QString& s); |
185 QRect cursorRect (void); | 185 QRect cursorRect (void); |
186 void selectAll(); | |
186 | 187 |
187 void log (const char* fmt, ...); | 188 void log (const char* fmt, ...); |
188 | 189 |
189 void closeStandardIO (int fd, DWORD stdHandleId, const char* name); | 190 void closeStandardIO (int fd, DWORD stdHandleId, const char* name); |
190 void setupStandardIO (DWORD stdHandleId, int fd, const char* name, | 191 void setupStandardIO (DWORD stdHandleId, int fd, const char* name, |
655 } | 656 } |
656 | 657 |
657 p.restore (); | 658 p.restore (); |
658 } | 659 } |
659 | 660 |
661 void QConsolePrivate::selectAll() | |
662 { | |
663 m_beginSelection = QPoint (0,0); | |
664 m_endSelection = QPoint(m_bufferSize.width (), | |
665 m_cursorPos.y()); | |
666 updateSelection(); | |
667 } | |
668 | |
660 void QConsolePrivate::drawSelection (QPainter& p, int cx1, int cy1, | 669 void QConsolePrivate::drawSelection (QPainter& p, int cx1, int cy1, |
661 int cx2, int cy2, int cw, int ch) | 670 int cx2, int cy2, int cw, int ch) |
662 { | 671 { |
663 p.save (); | 672 p.save (); |
664 | 673 |
1550 | 1559 |
1551 if (! text.isEmpty ()) | 1560 if (! text.isEmpty ()) |
1552 sendText (text); | 1561 sendText (text); |
1553 } | 1562 } |
1554 | 1563 |
1564 ////////////////////////////////////////////////////////////////////////////// | |
1565 | |
1566 void QWinTerminalImpl::selectAll (void) | |
1567 { | |
1568 if(!hasFocus()) return; | |
1569 | |
1570 d->selectAll(); | |
1571 } | |
1572 | |
1573 | |
1555 | 1574 |
1556 ////////////////////////////////////////////////////////////////////////////// | 1575 ////////////////////////////////////////////////////////////////////////////// |
1557 | 1576 |
1558 QString QWinTerminalImpl::selectedText () | 1577 QString QWinTerminalImpl::selectedText () |
1559 { | 1578 { |