view libgui/src/terminal-dock-widget.h @ 16648:b04413e5a811

improve handling of interrupts, copy and paste shortcuts * QTerminal.h (QTerminal::report_status_message): New signal. (QTerminal::QTerminal): Set shortcuts for copy and paste actions. Add copy and paste actions to QTerminal widget. Connect settings_changed, report_status_message, copyClipboard_signal, and pasteClipboard_signal. * QWinTerminalImpl.cpp (QWinTerminalImpl::copyClipboard): If selection is set, copy it and report status message. Otherwise, interrupt. * TerminalView.cpp (TerminalView::copyClipboard): Likewise. * main-window.cc (main_menu::construct_file_menu): Don't set shortcut for open action. (main_window::construct_edit_menu): Delete unimplemented cut, select all, and delete actions. Connect copy and paste actions to signals. (main_window::copyClipboard_signal, main_window::pasteClipboard_signal): New signals. (main_window::copyClipboard, main_window::pasteClipboard): New slots. (main_window::_cut_action): Delete member variable. * octave-qt-link.cc (octave_qt_link::do_pre_input_event): Disable input processing by the windows console. (octave_qt_link::do_post_input_event): Enable input processing by the windows console. * terminal-dock-widget.h, terminal-dock-widget.cc: Delete notice_settings, copyClipboard, and pasteClipboard signals, slots, and connections. (terminal_dock_widget::terminal_dock_widget): Don't connect visibilityChanged signal.
author John W. Eaton <jwe@octave.org>
date Mon, 13 May 2013 07:26:37 -0400
parents 2754c5fd6ae0
children d63878346099
line wrap: on
line source

/*

Copyright (C) 2013 John W. Eaton
Copyright (C) 2011-2012 Jacob Dawid

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/

#ifndef TERMINALDOCKWIDGET_H
#define TERMINALDOCKWIDGET_H

#include <QString>

#include "QTerminal.h"
#include "octave-dock-widget.h"

class terminal_dock_widget : public octave_dock_widget
{
  Q_OBJECT

public:

  terminal_dock_widget (QWidget *parent = 0);

  bool has_focus (void) const;

  void focus (void);

private:

  QTerminal *terminal;
};

#endif // TERMINALDOCKWIDGET_H