summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_handler.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_handler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 1338525..1092c82 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -18,27 +18,31 @@
18 * This nice QObject here will get stuff from 18 * This nice QObject here will get stuff from
19 * got a slot and a signal 19 * got a slot and a signal
20 * the signal for data 20 * the signal for data
21 * the slot for receiving 21 * the slot for receiving
22 * it'll set up the widget internally 22 * it'll set up the widget internally
23 * and manage the communication between 23 * and manage the communication between
24 * the pre QByteArray world! 24 * the pre QByteArray world!
25 */ 25 */
26class Profile; 26class Profile;
27class QWidget; 27class QWidget;
28class QPushButton; 28class QPushButton;
29class TEWidget; 29class TEWidget;
30class QFile;
30class TEmulation; 31class TEmulation;
31class QFont; 32class QFont;
33class QTextStream;
32class Script; 34class Script;
35class Logger;
36
33class EmulationHandler : public QObject { 37class EmulationHandler : public QObject {
34 Q_OBJECT 38 Q_OBJECT
35public: 39public:
36 /** 40 /**
37 * simple c'tor the parent of the TEWdiget 41 * simple c'tor the parent of the TEWdiget
38 * and a name 42 * and a name
39 * and a Profile 43 * and a Profile
40 */ 44 */
41 EmulationHandler( const Profile&, QWidget* parent, const char* name = 0l ); 45 EmulationHandler( const Profile&, QWidget* parent, const char* name = 0l );
42 46
43 /** 47 /**
44 * delete all components 48 * delete all components
@@ -46,32 +50,42 @@ public:
46 ~EmulationHandler(); 50 ~EmulationHandler();
47 51
48 void load( const Profile& ); 52 void load( const Profile& );
49 QWidget* widget(); 53 QWidget* widget();
50 TEmulation *emulation(); 54 TEmulation *emulation();
51 void setColor( const QColor& fore, const QColor& back ); 55 void setColor( const QColor& fore, const QColor& back );
52 QPushButton* cornerButton(); 56 QPushButton* cornerButton();
53 57
54 /* Scripts */ 58 /* Scripts */
55 /* Create a new script and record all typed characters */ 59 /* Create a new script and record all typed characters */
56 void startRecording(); 60 void startRecording();
57 61
62 void startLogging(const QString);
63
58 /* Return whether we are currently recording a script */ 64 /* Return whether we are currently recording a script */
59 bool isRecording(); 65 bool isRecording();
60 66
67 /* Return whether we are currently recording a log */
68 bool isLogging();
69
70 QString logFileName();
71
61 /* Return the current script (or NULL) */ 72 /* Return the current script (or NULL) */
62 Script *script(); 73 Script *script();
63 74
64 /* Stop recording and remove the current script from memory */ 75 /* Stop recording and remove the current script from memory */
65 void clearScript(); 76 void clearScript();
77
78 /* Stop logging and remove the current log from memory */
79 void clearLog();
66 80
67 /* Run a script by forwarding its keys to the EmulationLayer */ 81 /* Run a script by forwarding its keys to the EmulationLayer */
68 void runScript(const Script *); 82 void runScript(const Script *);
69 83
70 /* Propagate change to widget */ 84 /* Propagate change to widget */
71 void setWrap(int columns); 85 void setWrap(int columns);
72signals: 86signals:
73 void send( const QByteArray& ); 87 void send( const QByteArray& );
74 void changeSize(int rows, int cols ); 88 void changeSize(int rows, int cols );
75 89
76 90
77public slots: 91public slots:
@@ -81,15 +95,17 @@ public slots:
81 95
82private slots: 96private slots:
83 void recvEmulation( const char*, int len ); 97 void recvEmulation( const char*, int len );
84private: 98private:
85 QFont font( int ); 99 QFont font( int );
86 QColor foreColor(int ); 100 QColor foreColor(int );
87 QColor backColor(int ); 101 QColor backColor(int );
88 102
89private: 103private:
90 TEWidget* m_teWid; 104 TEWidget* m_teWid;
91 TEmulation* m_teEmu; 105 TEmulation* m_teEmu;
92 Script * m_script; 106 Script * m_script;
107 Logger *m_log;
108 QString m_logFileName;
93}; 109};
94 110
95#endif 111#endif