Mercurial > hg > octave-lyh
annotate gui/src/OctaveTerminal.h @ 13637:367919252ed6
Integrated kprocess_p in kprocess.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 22 Aug 2011 22:15:00 +0200 |
parents | 04931210aac0 |
children | bad5cb3cfe20 |
rev | line source |
---|---|
13504
13e3d60aff2d
Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13501
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13501 | 2 * Copyright (C) 2011 Jacob Dawid |
3 * jacob.dawid@googlemail.com | |
4 * | |
5 * This program is free software: you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation, either version 3 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 */ | |
18 | |
19 #ifndef OCTAVETERMINAL_H | |
20 #define OCTAVETERMINAL_H | |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
21 #include <QPlainTextEdit> |
13637
367919252ed6
Integrated kprocess_p in kprocess.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13635
diff
changeset
|
22 #include <QTextCodec> |
13635
04931210aac0
Arrow keys work. Removed two more classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13633
diff
changeset
|
23 #include "Pty.h" |
13501 | 24 |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
25 class OctaveTerminal:public QPlainTextEdit |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
26 { |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
27 Q_OBJECT |
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
28 public: |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
29 OctaveTerminal (QWidget * parent = 0); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
30 ~OctaveTerminal (); |
13501 | 31 |
13635
04931210aac0
Arrow keys work. Removed two more classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13633
diff
changeset
|
32 void sendText (QString text) { m_shellProcess->sendData (text.toLocal8Bit ()); } |
13517
86adc9c4ec4b
History deactivated.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
33 void openTerminal (); |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
34 |
13633
707c1490a85e
Replaced BEL debug message with emitting bell signal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13628
diff
changeset
|
35 signals: |
707c1490a85e
Replaced BEL debug message with emitting bell signal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13628
diff
changeset
|
36 void bell (); |
707c1490a85e
Replaced BEL debug message with emitting bell signal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13628
diff
changeset
|
37 |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
38 protected: |
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
39 void keyPressEvent (QKeyEvent *keyEvent); |
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13517
diff
changeset
|
40 |
13628
aa54bdaee8c8
Partially resotred receiving data.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13626
diff
changeset
|
41 protected slots: |
aa54bdaee8c8
Partially resotred receiving data.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13626
diff
changeset
|
42 void handleReceivedData (const QByteArray& data); |
aa54bdaee8c8
Partially resotred receiving data.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13626
diff
changeset
|
43 |
13501 | 44 private: |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
45 void construct (); |
13637
367919252ed6
Integrated kprocess_p in kprocess.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13635
diff
changeset
|
46 QTextCodec *m_textCodec; |
13635
04931210aac0
Arrow keys work. Removed two more classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13633
diff
changeset
|
47 Pty *m_shellProcess; |
13501 | 48 }; |
49 #endif // OCTAVETERMINAL_H |