comparison libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h @ 15681:018c46ef8a0c

maint: move everything under libgui/qterminal
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 26 Nov 2012 12:07:51 -0500
parents libqterminal/unix/QUnixTerminalImpl.h@f620ecde2566
children fa842e78f491
comparison
equal deleted inserted replaced
15680:6b1369106141 15681:018c46ef8a0c
1 /* Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
2 Copyright (C) 2012 Jacob Dawid <jacob.dawid@googlemail.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18 */
19
20
21 #ifndef Q_UNIXTERMINALIMPL
22 #define Q_UNIXTERMINALIMPL
23
24 #include <QtGui>
25 #include "unix/kpty.h"
26 #include "unix/TerminalModel.h"
27 #include "unix/TerminalView.h"
28 #include "QTerminalInterface.h"
29
30 class QUnixTerminalImpl : public QTerminalInterface
31 {
32 Q_OBJECT
33 public:
34 QUnixTerminalImpl(QWidget *parent = 0);
35 virtual ~QUnixTerminalImpl();
36
37 void setTerminalFont(const QFont &font);
38 void setSize(int h, int v);
39 void sendText(const QString& text);
40
41 void setCursorType(CursorType type, bool blinking);
42
43 public slots:
44 void copyClipboard();
45 void pasteClipboard();
46
47 protected:
48 void focusInEvent(QFocusEvent *focusEvent);
49 void showEvent(QShowEvent *);
50 virtual void resizeEvent(QResizeEvent *);
51
52 private:
53 void initialize();
54 void connectToPty();
55
56 TerminalView *m_terminalView;
57 TerminalModel *m_terminalModel;
58 KPty *m_kpty;
59 };
60
61 #endif // Q_UNIXTERMINALIMPL