summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_handler.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_handler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 8846959..df8e573 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -8,3 +8,3 @@
8#include "emulation_handler.h" 8#include "emulation_handler.h"
9 9#include "script.h"
10 10
@@ -15,2 +15,3 @@ EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const c
15 m_teWid->setMinimumSize(150, 70 ); 15 m_teWid->setMinimumSize(150, 70 );
16 m_script = 0;
16 parent->resize( m_teWid->calcSize(80, 24 ) ); 17 parent->resize( m_teWid->calcSize(80, 24 ) );
@@ -30,2 +31,4 @@ EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const c
30EmulationHandler::~EmulationHandler() { 31EmulationHandler::~EmulationHandler() {
32 if (isRecording())
33 clearScript();
31 delete m_teEmu; 34 delete m_teEmu;
@@ -33,2 +36,3 @@ EmulationHandler::~EmulationHandler() {
33} 36}
37
34void EmulationHandler::load( const Profile& prof) { 38void EmulationHandler::load( const Profile& prof) {
@@ -47,2 +51,4 @@ void EmulationHandler::recvEmulation(const char* src, int len ) {
47 51
52 if (isRecording())
53 m_script->append(ar);
48 emit send(ar); 54 emit send(ar);
@@ -147 +153,27 @@ QPushButton* EmulationHandler::cornerButton() {
147} 153}
154
155
156Script *EmulationHandler::script() {
157 return m_script;
158}
159
160bool EmulationHandler::isRecording() {
161 return (m_script != 0);
162}
163
164void EmulationHandler::startRecording() {
165 if (!isRecording())
166 m_script = new Script();
167}
168
169void EmulationHandler::clearScript() {
170 if (isRecording()) {
171 delete m_script;
172 m_script = 0;
173 }
174}
175
176void EmulationHandler::runScript(const Script *script) {
177 emit send(script->script());
178}
179