Diffstat (limited to 'noncore/apps/opie-console/TEmulation.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/TEmulation.h | 5 |
1 files changed, 5 insertions, 0 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 | |||
@@ -15,37 +15,40 @@ | |||
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 | ||
@@ -66,24 +69,26 @@ public: | |||
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; |