summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_layer.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/emulation_layer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_layer.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/noncore/apps/opie-console/emulation_layer.cpp b/noncore/apps/opie-console/emulation_layer.cpp
index 265c11f..6a2679e 100644
--- a/noncore/apps/opie-console/emulation_layer.cpp
+++ b/noncore/apps/opie-console/emulation_layer.cpp
@@ -104,13 +104,12 @@ EmulationLayer::EmulationLayer( WidgetLayer* gui )
screen[1] = new Screen(gui->lines(),gui->columns());
scr = screen[0];
bulk_nlcnt = 0; // reset bulk newline counter
bulk_incnt = 0; // reset bulk counter
connected = FALSE;
- m_script = 0;
QObject::connect(&bulk_timer, SIGNAL( timeout() ), this, SLOT( showBulk() ) );
QObject::connect(gui,SIGNAL( imageSizeChanged( int, int ) ),
this,SLOT( onImageSizeChange( int, int ) ) );
QObject::connect(gui,SIGNAL( changedHistoryCursor( int ) ),
this,SLOT( historyCursorChange( int ) ) );
@@ -130,14 +129,12 @@ EmulationLayer::EmulationLayer( WidgetLayer* gui )
*/
EmulationLayer::~EmulationLayer()
{
delete screen[0];
delete screen[1];
- if (isRecording())
- clearScript();
bulk_timer.stop();
}
/*! change between primary and alternate screen
*/
@@ -229,15 +226,12 @@ void EmulationLayer::onKeyPress( QKeyEvent* ev )
else if (ev->ascii()>0)
{
QByteArray c = QByteArray( 1 );
c.at( 0 ) = ev->ascii();
// ibot: qbytearray is emited not char*
- /* Are we currently recording a script? If so, store the typed character */
- if (isRecording())
- m_script->appendString(ev->text());
emit sndBlock( (QByteArray) c );
}
}
// Unblocking, Byte to Unicode translation --------------------------------- --
@@ -258,41 +252,12 @@ void EmulationLayer::onRcvBlock(const QByteArray &s )
onRcvChar(result[j].unicode());
if (s[i] == '\n') bulkNewline();
}
bulkEnd();
}
-// Scripts ----------------------------------------------------------------- --
-
-
-Script *EmulationLayer::script() {
- return m_script;
-}
-
-bool EmulationLayer::isRecording() {
- return (m_script != 0);
-}
-
-void EmulationLayer::startRecording() {
- if (!isRecording())
- m_script = new Script();
-}
-
-void EmulationLayer::clearScript() {
- if (isRecording()) {
-
- }
-}
-
-void EmulationLayer::runScript(const Script *script) {
- QByteArray a = QByteArray();
- QString str = script->script();
- a.setRawData(str.ascii(), str.length());
- emit sndBlock(a);
-}
-
// Selection --------------------------------------------------------------- --
void EmulationLayer::onSelectionBegin(const int x, const int y) {
if (!connected) return;
scr->setSelBeginXY(x,y);
showBulk();
@@ -403,6 +368,7 @@ void EmulationLayer::onHistoryCursorChange(int cursor)
void EmulationLayer::setColumns(int columns)
{
//FIXME: this goes strange ways.
// Can we put this straight or explain it at least?
emit changeColumns(columns);
}
+