Diffstat (limited to 'noncore/apps/opie-console/TEmulation.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/TEmulation.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/TEmulation.h b/noncore/apps/opie-console/TEmulation.h index ec15e7a..d7b3d6d 100644 --- a/noncore/apps/opie-console/TEmulation.h +++ b/noncore/apps/opie-console/TEmulation.h | |||
@@ -3,99 +3,104 @@ | |||
3 | /* [emulation.h] Fundamental Terminal Emulation */ | 3 | /* [emulation.h] Fundamental Terminal Emulation */ |
4 | /* */ | 4 | /* */ |
5 | /* -------------------------------------------------------------------------- */ | 5 | /* -------------------------------------------------------------------------- */ |
6 | /* */ | 6 | /* */ |
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
8 | /* */ | 8 | /* */ |
9 | /* This file is part of Konsole - an X terminal for KDE */ | 9 | /* This file is part of Konsole - an X terminal for KDE */ |
10 | /* */ | 10 | /* */ |
11 | /* -------------------------------------------------------------------------- */ | 11 | /* -------------------------------------------------------------------------- */ |
12 | /* */ | 12 | /* */ |
13 | /* Ported Konsole to Qt/Embedded */ | 13 | /* Ported Konsole to Qt/Embedded */ |
14 | /* */ | 14 | /* */ |
15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
16 | /* */ | 16 | /* */ |
17 | /* -------------------------------------------------------------------------- */ | 17 | /* -------------------------------------------------------------------------- */ |
18 | 18 | ||
19 | #ifndef EMULATION_H | 19 | #ifndef EMULATION_H |
20 | #define EMULATION_H | 20 | #define EMULATION_H |
21 | 21 | ||
22 | #include "TEWidget.h" | 22 | #include "TEWidget.h" |
23 | #include "TEScreen.h" | 23 | #include "TEScreen.h" |
24 | #include <qtimer.h> | 24 | #include <qtimer.h> |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | #include <qtextcodec.h> | 26 | #include <qtextcodec.h> |
27 | #include <qtextstream.h> | ||
28 | |||
27 | #include "keytrans.h" | 29 | #include "keytrans.h" |
28 | 30 | ||
29 | class TEmulation : public QObject | 31 | class TEmulation : public QObject |
30 | { Q_OBJECT | 32 | { Q_OBJECT |
31 | 33 | ||
32 | public: | 34 | public: |
33 | 35 | ||
34 | TEmulation(TEWidget* gui); | 36 | TEmulation(TEWidget* gui); |
35 | ~TEmulation(); | 37 | ~TEmulation(); |
36 | 38 | ||
37 | public: | 39 | public: |
38 | virtual void setHistory(bool on); | 40 | virtual void setHistory(bool on); |
39 | virtual bool history(); | 41 | virtual bool history(); |
42 | virtual void streamHistory( QTextStream* ); | ||
40 | 43 | ||
41 | public slots: // signals incoming from TEWidget | 44 | public slots: // signals incoming from TEWidget |
42 | 45 | ||
43 | virtual void onImageSizeChange(int lines, int columns); | 46 | virtual void onImageSizeChange(int lines, int columns); |
44 | virtual void onHistoryCursorChange(int cursor); | 47 | virtual void onHistoryCursorChange(int cursor); |
45 | virtual void onKeyPress(QKeyEvent*); | 48 | virtual void onKeyPress(QKeyEvent*); |
46 | 49 | ||
47 | virtual void clearSelection(); | 50 | virtual void clearSelection(); |
48 | virtual void onSelectionBegin(const int x, const int y); | 51 | virtual void onSelectionBegin(const int x, const int y); |
49 | virtual void onSelectionExtend(const int x, const int y); | 52 | virtual void onSelectionExtend(const int x, const int y); |
50 | virtual void setSelection(const BOOL preserve_line_breaks); | 53 | virtual void setSelection(const BOOL preserve_line_breaks); |
51 | 54 | ||
52 | public slots: // signals incoming from data source | 55 | public slots: // signals incoming from data source |
53 | 56 | ||
54 | void onRcvBlock(const char* txt,int len); | 57 | void onRcvBlock(const char* txt,int len); |
55 | 58 | ||
56 | signals: | 59 | signals: |
57 | 60 | ||
58 | void sndBlock(const char* txt,int len); | 61 | void sndBlock(const char* txt,int len); |
59 | void ImageSizeChanged(int lines, int columns); | 62 | void ImageSizeChanged(int lines, int columns); |
60 | void changeColumns(int columns); | 63 | void changeColumns(int columns); |
61 | void changeTitle(int arg, const char* str); | 64 | void changeTitle(int arg, const char* str); |
62 | 65 | ||
63 | public: | 66 | public: |
64 | 67 | ||
65 | virtual void onRcvChar(int); | 68 | virtual void onRcvChar(int); |
66 | 69 | ||
67 | virtual void setMode (int) = 0; | 70 | virtual void setMode (int) = 0; |
68 | virtual void resetMode(int) = 0; | 71 | virtual void resetMode(int) = 0; |
69 | 72 | ||
70 | virtual void sendString(const char*) = 0; | 73 | virtual void sendString(const char*) = 0; |
71 | 74 | ||
72 | virtual void setConnect(bool r); | 75 | virtual void setConnect(bool r); |
73 | void setColumns(int columns); | 76 | void setColumns(int columns); |
74 | 77 | ||
75 | void setKeytrans(int no); | 78 | void setKeytrans(int no); |
76 | void setKeytrans(const char * no); | 79 | void setKeytrans(const char * no); |
77 | 80 | ||
81 | |||
82 | |||
78 | protected: | 83 | protected: |
79 | 84 | ||
80 | TEWidget* gui; | 85 | TEWidget* gui; |
81 | TEScreen* scr; // referes to one `screen' | 86 | TEScreen* scr; // referes to one `screen' |
82 | TEScreen* screen[2]; // 0 = primary, 1 = alternate | 87 | TEScreen* screen[2]; // 0 = primary, 1 = alternate |
83 | void setScreen(int n); // set `scr' to `screen[n]' | 88 | void setScreen(int n); // set `scr' to `screen[n]' |
84 | 89 | ||
85 | bool connected; // communicate with widget | 90 | bool connected; // communicate with widget |
86 | 91 | ||
87 | void setCodec(int c); // codec number, 0 = locale, 1=utf8 | 92 | void setCodec(int c); // codec number, 0 = locale, 1=utf8 |
88 | 93 | ||
89 | QTextCodec* codec; | 94 | QTextCodec* codec; |
90 | QTextCodec* localeCodec; | 95 | QTextCodec* localeCodec; |
91 | QTextDecoder* decoder; | 96 | QTextDecoder* decoder; |
92 | 97 | ||
93 | KeyTrans* keytrans; | 98 | KeyTrans* keytrans; |
94 | 99 | ||
95 | // refreshing related material. | 100 | // refreshing related material. |
96 | // this is localized in the class. | 101 | // this is localized in the class. |
97 | private slots: // triggered by timer | 102 | private slots: // triggered by timer |
98 | 103 | ||
99 | void showBulk(); | 104 | void showBulk(); |
100 | 105 | ||
101 | private: | 106 | private: |