Mercurial > hg > octave-nkf
annotate libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp @ 16620:818eef7b2618
allow terminal colors to be set from preferences dialog
* QTerminalInterface.h (QTerminalInterface::setBackgroundColor,
QTerminalInterface::setForeroundColor,
QTerminalInterface::setSelectionColor,
QTerminalInterface::setCursorColor): New functions.
* QUnixTerminalImpl.h, QUnixTerminalImpl.cpp
QUnixTerminalImpl::setBackgroundColor,
QUnixTerminalImpl::setForeroundColor,
QUnixTerminalImpl::setSelectionColor,
QUnixTerminalImpl::setCursorColor): New functions.
* QWinTerminalImpl.h, QWinTerminalImpl.cpp
(QConsolePrivate::setCursorColor): New argument, useForegroundColor.
(QConsolePrivate::m_selectionColor, QConsolePrivate::m_cursorColor):
New member variablebs.
(QConsolePrivate::selectionColor, QConsolePrivate::cursorColor,
QConsolePrivate::setSelectionColor, QConsolePrivate::setCursorColor):
Use member variables instead of Windows console color map.
(QConsolePrivate::cursorColor): Return foreground color if stored
color is invalid.
(QConsolePrivate::setCursorColor): Store invalid color if
useForegroundcolor.
(QConsolePrivate::QConsolePrivate): Set default selection and cursor
colors.
* QTerminal.cc (QTerminal::notice_settings): Handle terminal color
settings.
* resource-manager.h, resource-manager.cc
(resource_manager::terminal_color_names,
resource_manager::terminal_default_colors,
resource_manager::terminal_color_chars): New functions.
* settings-dialog.h, settings-dialog.cc
(settings_dialog::read_terminal_colors): New function.
(settings_dialog::settings_dialog): Call read_terminal_colors. Read
valud for using foreground color for cursor color.
(settings_dialog::write_terminal_colors): New function.
(settings_dialog::write_changed_settings): Call
write_terminal_colors. Handle setting for using foreground color for
cursor color.
* settings-dialog.ui: Add color selection to terminal settings
dialog.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 May 2013 06:00:44 -0400 |
parents | 6f7940e36322 |
children | ba808cd9d86c |
rev | line source |
---|---|
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
1 /* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
2 Copyright (C) 2012 Jacob Dawid <jacob.dawid@googlemail.com> |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
3 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
4 This library is free software; you can redistribute it and/or |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
5 modify it under the terms of the GNU Library General Public |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
6 License as published by the Free Software Foundation; either |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
7 version 2 of the License, or (at your option) any later version. |
15659 | 8 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
9 This library is distributed in the hope that it will be useful, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
12 Library General Public License for more details. |
15659 | 13 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
14 You should have received a copy of the GNU Library General Public License |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
15 along with this library; see the file COPYING.LIB. If not, write to |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
17 Boston, MA 02110-1301, USA. |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
18 */ |
15659 | 19 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
20 #include <QDebug> |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
21 |
15653
35c891dce299
Removed INCLUDEPATH.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15652
diff
changeset
|
22 #include "unix/QUnixTerminalImpl.h" |
35c891dce299
Removed INCLUDEPATH.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15652
diff
changeset
|
23 #include "unix/kpty.h" |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
24 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
25 #include <termios.h> |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
26 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
27 QUnixTerminalImpl::QUnixTerminalImpl(QWidget *parent) |
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
28 : QTerminalInterface(parent) { |
15862
98902367c781
gui: smaller minimal size of the command widget (bug #37038)
Torsten <ttl@justmail.de>
parents:
15681
diff
changeset
|
29 setMinimumSize(300, 200); |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
30 initialize(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
31 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
32 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
33 void QUnixTerminalImpl::initialize() |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
34 { |
15659 | 35 m_terminalView = new TerminalView(this); |
15674
2318531b7880
Changed cursor to underline cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15669
diff
changeset
|
36 m_terminalView->setKeyboardCursorShape(TerminalView::UnderlineCursor); |
15675
22bd268429d3
Cursor is now blinking in the terminal.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15674
diff
changeset
|
37 m_terminalView->setBlinkingCursor(true); |
15659 | 38 m_terminalView->setBellMode(TerminalView::NotifyBell); |
39 m_terminalView->setTerminalSizeHint(true); | |
15669
a8ff19a82906
Added copy&paste context menu in the unix implementation.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15662
diff
changeset
|
40 m_terminalView->setContextMenuPolicy(Qt::CustomContextMenu); |
15659 | 41 m_terminalView->setTripleClickMode(TerminalView::SelectWholeLine); |
42 m_terminalView->setTerminalSizeStartup(true); | |
43 m_terminalView->setSize(80, 40); | |
44 m_terminalView->setScrollBarPosition(TerminalView::ScrollBarRight); | |
45 | |
15669
a8ff19a82906
Added copy&paste context menu in the unix implementation.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15662
diff
changeset
|
46 connect(m_terminalView, SIGNAL(customContextMenuRequested(QPoint)), |
a8ff19a82906
Added copy&paste context menu in the unix implementation.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15662
diff
changeset
|
47 this, SLOT(handleCustomContextMenuRequested(QPoint))); |
a8ff19a82906
Added copy&paste context menu in the unix implementation.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15662
diff
changeset
|
48 |
15659 | 49 #ifdef Q_OS_MAC |
50 QFont font = QFont("Monaco"); | |
51 font.setStyleHint(QFont::TypeWriter); | |
52 font.setPointSize(11); | |
53 #else | |
54 QFont font = QFont("Monospace"); | |
55 font.setStyleHint(QFont::TypeWriter); | |
56 font.setPointSize(10); | |
57 #endif | |
58 setTerminalFont(font); | |
59 setFocusProxy(m_terminalView); | |
60 setFocus(Qt::OtherFocusReason); | |
61 | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
62 m_kpty = new KPty(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
63 m_kpty->open(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
64 |
15659 | 65 m_terminalModel = new TerminalModel(m_kpty); |
66 m_terminalModel->setAutoClose(true); | |
67 m_terminalModel->setCodec(QTextCodec::codecForName("UTF-8")); | |
68 m_terminalModel->setHistoryType(HistoryTypeBuffer(1000)); | |
69 m_terminalModel->setDarkBackground(true); | |
70 m_terminalModel->setKeyBindings(""); | |
71 m_terminalModel->run(); | |
72 m_terminalModel->addView(m_terminalView); | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
73 connectToPty(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
74 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
75 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
76 void QUnixTerminalImpl::connectToPty() |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
77 { |
16484
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
78 // Store the file descriptor associated with the STDERR stream onto |
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
79 // another temporary file descriptor for reconnect in the destructor. |
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
80 fdstderr = dup (STDERR_FILENO); |
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
81 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
82 int fds = m_kpty->slaveFd(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
83 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
84 dup2 (fds, STDIN_FILENO); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
85 dup2 (fds, STDOUT_FILENO); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
86 dup2 (fds, STDERR_FILENO); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
87 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
88 if(!isatty(STDIN_FILENO)) { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
89 qDebug("Error: stdin is not a tty."); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
90 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
91 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
92 if(!isatty(STDOUT_FILENO)) { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
93 qDebug("Error: stdout is not a tty."); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
94 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
95 |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
96 if(!isatty(STDERR_FILENO)) { |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
97 qDebug("Error: stderr is not a tty."); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
98 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
99 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
100 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
101 QUnixTerminalImpl::~QUnixTerminalImpl() |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
102 { |
16484
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
103 // Restore stderr so that any errors at exit might appear somewhere. |
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
104 dup2 (fdstderr, STDERR_FILENO); |
fa842e78f491
Restore STDERR stream pipe before exit to capture error messages.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
15862
diff
changeset
|
105 |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
106 emit destroyed(); |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
107 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
108 |
15662
5758e0013246
Enable compilation on Win32-native platform.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15659
diff
changeset
|
109 void QUnixTerminalImpl::setTerminalFont(const QFont &font) |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
110 { |
15659 | 111 if(!m_terminalView) |
112 return; | |
113 m_terminalView->setVTFont(font); | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
114 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
115 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
116 void QUnixTerminalImpl::setSize(int h, int v) |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
117 { |
15659 | 118 if(!m_terminalView) |
119 return; | |
120 m_terminalView->setSize(h, v); | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
121 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
122 |
15662
5758e0013246
Enable compilation on Win32-native platform.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15659
diff
changeset
|
123 void QUnixTerminalImpl::sendText(const QString& text) |
15656
c05926c0657d
Added sendText method again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
124 { |
15659 | 125 m_terminalModel->sendText(text); |
15656
c05926c0657d
Added sendText method again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
126 } |
c05926c0657d
Added sendText method again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15653
diff
changeset
|
127 |
15677
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
128 void QUnixTerminalImpl::setCursorType(CursorType type, bool blinking) |
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
129 { |
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
130 switch(type) { |
15680
6b1369106141
Fix error in setting the terminal cursor shape
Mike Miller <mtmiller@ieee.org>
parents:
15677
diff
changeset
|
131 case UnderlineCursor: m_terminalView->setKeyboardCursorShape(TerminalView::UnderlineCursor); break; |
6b1369106141
Fix error in setting the terminal cursor shape
Mike Miller <mtmiller@ieee.org>
parents:
15677
diff
changeset
|
132 case BlockCursor: m_terminalView->setKeyboardCursorShape(TerminalView::BlockCursor); break; |
6b1369106141
Fix error in setting the terminal cursor shape
Mike Miller <mtmiller@ieee.org>
parents:
15677
diff
changeset
|
133 case IBeamCursor: m_terminalView->setKeyboardCursorShape(TerminalView::IBeamCursor); break; |
15677
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
134 } |
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
135 m_terminalView->setBlinkingCursor(blinking); |
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
136 } |
f620ecde2566
Added support for changing the cursor.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
15675
diff
changeset
|
137 |
16620
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
138 // FIXME -- not sure how to make these work properly given the way the |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
139 // Unix terminal handles colors. |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
140 void QUnixTerminalImpl::setBackgroundColor (const QColor& color) { } |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
141 void QUnixTerminalImpl::setForegroundColor (const QColor& color) { } |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
142 void QUnixTerminalImpl::setSelectionColor (const QColor& color) { } |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
143 |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
144 void QUnixTerminalImpl::setCursorColor (bool useForegroundColor, |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
145 const QColor& color) |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
146 { |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
147 m_terminalView->setKeyboardCursorColor (useForegroundColor, color); |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
148 } |
818eef7b2618
allow terminal colors to be set from preferences dialog
John W. Eaton <jwe@octave.org>
parents:
16609
diff
changeset
|
149 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
150 void QUnixTerminalImpl::showEvent(QShowEvent *) |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
151 { |
15659 | 152 m_terminalView->updateImage(); |
153 m_terminalView->repaint(); | |
154 m_terminalView->update(); | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
155 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
156 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
157 void QUnixTerminalImpl::resizeEvent(QResizeEvent*) |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
158 { |
15659 | 159 m_terminalView->resize(this->size()); |
160 m_terminalView->updateImage(); | |
161 m_terminalView->repaint(); | |
162 m_terminalView->update(); | |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
163 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
164 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
165 void QUnixTerminalImpl::copyClipboard() |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
166 { |
15659 | 167 m_terminalView->copyClipboard(); |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
168 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
169 |
15658
eaa7da75d202
Added QTerminalInteface class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15656
diff
changeset
|
170 void QUnixTerminalImpl::pasteClipboard() |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
171 { |
15659 | 172 m_terminalView->pasteClipboard(); |
15651
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
173 } |
845cebf281aa
Added files of QConsole.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
174 |