Mercurial > octave-nkf
annotate libqterminal/QTerminal.h @ 15650:ba360324035e
Fixed bug with redrawing the terminal when widget is being shown.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 30 Jan 2012 02:18:59 +0100 |
parents | c22fa57226b2 |
children | 845cebf281aa |
rev | line source |
---|---|
15631 | 1 /* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) |
15647
a044a259c423
Renamed SessionModel in TerminalModel.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15646
diff
changeset
|
2 Copyright (C) 2012 Jacob Dawid <jacob.dawid@googlemail.com> |
a044a259c423
Renamed SessionModel in TerminalModel.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15646
diff
changeset
|
3 |
15631 | 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 | |
15633
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
21 #ifndef Q_TERMINAL |
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
22 #define Q_TERMINAL |
15631 | 23 |
24 #include <QtGui> | |
15649
c22fa57226b2
Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15648
diff
changeset
|
25 #include "kpty.h" |
15647
a044a259c423
Renamed SessionModel in TerminalModel.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15646
diff
changeset
|
26 #include "TerminalModel.h" |
15648
d49e99269c0b
Renamed SessionView in TerminalView and correct proxy focus for QTerminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15647
diff
changeset
|
27 #include "TerminalView.h" |
15631 | 28 |
29 class QTerminal : public QWidget | |
30 { | |
31 Q_OBJECT | |
32 public: | |
15633
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
33 QTerminal(QWidget *parent = 0); |
15631 | 34 ~QTerminal(); |
35 | |
15633
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
36 void setTerminalFont(QFont &font); |
15631 | 37 void setArgs(QStringList &args); |
38 void setTextCodec(QTextCodec *codec); | |
39 void setSize(int h, int v); | |
15633
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
40 void setHistorySize(int lines); |
15631 | 41 void setReadOnly(bool); |
42 | |
43 signals: | |
44 void finished(); | |
45 | |
46 public slots: | |
47 void copyClipboard(); | |
48 void pasteClipboard(); | |
49 | |
15646
f570d3baa6fb
Removed unused code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15639
diff
changeset
|
50 protected: |
f570d3baa6fb
Removed unused code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15639
diff
changeset
|
51 void focusInEvent(QFocusEvent *focusEvent); |
15650
ba360324035e
Fixed bug with redrawing the terminal when widget is being shown.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15649
diff
changeset
|
52 void showEvent(QShowEvent *); |
15631 | 53 virtual void resizeEvent(QResizeEvent *); |
54 | |
55 protected slots: | |
56 void sessionFinished(); | |
57 | |
58 private: | |
15649
c22fa57226b2
Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15648
diff
changeset
|
59 void initialize(); |
c22fa57226b2
Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15648
diff
changeset
|
60 void connectToPty(); |
c22fa57226b2
Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15648
diff
changeset
|
61 |
15648
d49e99269c0b
Renamed SessionView in TerminalView and correct proxy focus for QTerminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15647
diff
changeset
|
62 TerminalView *m_sessionView; |
15647
a044a259c423
Renamed SessionModel in TerminalModel.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15646
diff
changeset
|
63 TerminalModel *m_sessionModel; |
15649
c22fa57226b2
Fixed bug with ECHOCTL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15648
diff
changeset
|
64 KPty *m_kpty; |
15631 | 65 }; |
66 | |
15633
36110925f67b
Simplified code.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
15631
diff
changeset
|
67 #endif // Q_TERMINAL |