summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_layer.cpp
Unidiff
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.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/noncore/apps/opie-console/emulation_layer.cpp b/noncore/apps/opie-console/emulation_layer.cpp
index 6c420e0..5baf05c 100644
--- a/noncore/apps/opie-console/emulation_layer.cpp
+++ b/noncore/apps/opie-console/emulation_layer.cpp
@@ -77,5 +77,5 @@
77 77
78#include "emulation_layer.h" 78#include "emulation_layer.h"
79#include "widget.h" 79#include "widget_layer.h"
80#include "screen.h" 80#include "screen.h"
81#include <stdio.h> 81#include <stdio.h>
@@ -96,11 +96,11 @@
96*/ 96*/
97 97
98EmulationLayer::EmulationLayer(Widget* gui) 98EmulationLayer::EmulationLayer( WidgetLayer* gui )
99: decoder((QTextDecoder*)NULL) 99: decoder((QTextDecoder*)NULL)
100{ 100{
101 this->gui = gui; 101 this->gui = gui;
102 102
103 screen[0] = new Screen(gui->Lines(),gui->Columns()); 103 screen[0] = new Screen(gui->lines(),gui->columns());
104 screen[1] = new Screen(gui->Lines(),gui->Columns()); 104 screen[1] = new Screen(gui->lines(),gui->columns());
105 scr = screen[0]; 105 scr = screen[0];
106 106
@@ -109,19 +109,19 @@ EmulationLayer::EmulationLayer(Widget* gui)
109 connected = FALSE; 109 connected = FALSE;
110 110
111 QObject::connect(&bulk_timer, SIGNAL(timeout()), this, SLOT(showBulk()) ); 111 QObject::connect(&bulk_timer, SIGNAL( timeout() ), this, SLOT( showBulk() ) );
112 QObject::connect(gui,SIGNAL(changedImageSizeSignal(int,int)), 112 QObject::connect(gui,SIGNAL( imageSizeChanged( int, int ) ),
113 this,SLOT(onImageSizeChange(int,int))); 113 this,SLOT( onImageSizeChange( int, int ) ) );
114 QObject::connect(gui,SIGNAL(changedHistoryCursor(int)), 114 QObject::connect(gui,SIGNAL( changedHistoryCursor( int ) ),
115 this,SLOT(onHistoryCursorChange(int))); 115 this,SLOT( historyCursorChange( int ) ) );
116 QObject::connect(gui,SIGNAL(keyPressedSignal(QKeyEvent*)), 116 QObject::connect(gui,SIGNAL( keyPressed( QKeyEvent* ) ),
117 this,SLOT(onKeyPress(QKeyEvent*))); 117 this,SLOT( onKeyPress( QKeyEvent* ) ) );
118 QObject::connect(gui,SIGNAL(beginSelectionSignal(const int,const int)), 118 QObject::connect(gui,SIGNAL( selectionBegin( const int, const int) ),
119 this,SLOT(onSelectionBegin(const int,const int)) ); 119 this,SLOT( onSelectionBegin( const int, const int ) ) );
120 QObject::connect(gui,SIGNAL(extendSelectionSignal(const int,const int)), 120 QObject::connect(gui,SIGNAL( selectionExtended( const int, const int ) ),
121 this,SLOT(onSelectionExtend(const int,const int)) ); 121 this,SLOT( onSelectionExtend( const int,const int ) ) );
122 QObject::connect(gui,SIGNAL(endSelectionSignal(const BOOL)), 122 QObject::connect(gui,SIGNAL( selectionEnd( const bool ) ),
123 this,SLOT(setSelection(const BOOL)) ); 123 this,SLOT( setSelection( const bool ) ) );
124 QObject::connect(gui,SIGNAL(clearSelectionSignal()), 124 QObject::connect(gui,SIGNAL( selectionCleared() ),
125 this,SLOT(clearSelection()) ); 125 this,SLOT( clearSelection() ) );
126} 126}
127 127
@@ -198,5 +198,5 @@ void EmulationLayer::onRcvChar(int c)
198 case '\n' : scr->NewLine(); break; 198 case '\n' : scr->NewLine(); break;
199 case '\r' : scr->Return(); break; 199 case '\r' : scr->Return(); break;
200 case 0x07 : gui->Bell(); break; 200 case 0x07 : gui->bell(); break;
201 default : scr->ShowCharacter(c); break; 201 default : scr->ShowCharacter(c); break;
202 }; 202 };
@@ -304,9 +304,9 @@ void EmulationLayer::showBulk()
304 if (connected) 304 if (connected)
305 { 305 {
306 Character* image = scr->getCookedImage(); // get the image 306 QArray<Character> image = scr->getCookedImage(); // get the image
307 gui->setImage(image, 307 gui->setImage(image,
308 scr->getLines(), 308 scr->getLines(),
309 scr->getColumns()); // actual refresh 309 scr->getColumns()); // actual refresh
310 free(image); 310 delete image;
311 //FIXME: check that we do not trigger other draw event here. 311 //FIXME: check that we do not trigger other draw event here.
312 gui->setScroll(scr->getHistCursor(),scr->getHistLines()); 312 gui->setScroll(scr->getHistCursor(),scr->getHistLines());
@@ -321,5 +321,5 @@ void EmulationLayer::bulkStart()
321void EmulationLayer::bulkEnd() 321void EmulationLayer::bulkEnd()
322{ 322{
323 if ( bulk_nlcnt > gui->Lines() || bulk_incnt > 20 ) 323 if ( bulk_nlcnt > gui->lines() || bulk_incnt > 20 )
324 showBulk(); // resets bulk_??cnt to 0, too. 324 showBulk(); // resets bulk_??cnt to 0, too.
325 else 325 else
@@ -332,5 +332,5 @@ void EmulationLayer::setConnect(bool c)
332 if ( connected) 332 if ( connected)
333 { 333 {
334 onImageSizeChange(gui->Lines(), gui->Columns()); 334 onImageSizeChange(gui->lines(), gui->columns());
335 showBulk(); 335 showBulk();
336 } 336 }