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.cpp | 48 |
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 @@ -78,3 +78,3 @@ #include "emulation_layer.h" -#include "widget.h" +#include "widget_layer.h" #include "screen.h" @@ -97,3 +97,3 @@ -EmulationLayer::EmulationLayer(Widget* gui) +EmulationLayer::EmulationLayer( WidgetLayer* gui ) : decoder((QTextDecoder*)NULL) @@ -102,4 +102,4 @@ EmulationLayer::EmulationLayer(Widget* gui) - screen[0] = new Screen(gui->Lines(),gui->Columns()); - screen[1] = new Screen(gui->Lines(),gui->Columns()); + screen[0] = new Screen(gui->lines(),gui->columns()); + screen[1] = new Screen(gui->lines(),gui->columns()); scr = screen[0]; @@ -110,17 +110,17 @@ EmulationLayer::EmulationLayer(Widget* gui) - QObject::connect(&bulk_timer, SIGNAL(timeout()), this, SLOT(showBulk()) ); - QObject::connect(gui,SIGNAL(changedImageSizeSignal(int,int)), - this,SLOT(onImageSizeChange(int,int))); - QObject::connect(gui,SIGNAL(changedHistoryCursor(int)), - this,SLOT(onHistoryCursorChange(int))); - QObject::connect(gui,SIGNAL(keyPressedSignal(QKeyEvent*)), - this,SLOT(onKeyPress(QKeyEvent*))); - QObject::connect(gui,SIGNAL(beginSelectionSignal(const int,const int)), - this,SLOT(onSelectionBegin(const int,const int)) ); - QObject::connect(gui,SIGNAL(extendSelectionSignal(const int,const int)), - this,SLOT(onSelectionExtend(const int,const int)) ); - QObject::connect(gui,SIGNAL(endSelectionSignal(const BOOL)), - this,SLOT(setSelection(const BOOL)) ); - QObject::connect(gui,SIGNAL(clearSelectionSignal()), - this,SLOT(clearSelection()) ); + 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 ) ) ); + QObject::connect(gui,SIGNAL( keyPressed( QKeyEvent* ) ), + this,SLOT( onKeyPress( QKeyEvent* ) ) ); + QObject::connect(gui,SIGNAL( selectionBegin( const int, const int) ), + this,SLOT( onSelectionBegin( const int, const int ) ) ); + QObject::connect(gui,SIGNAL( selectionExtended( const int, const int ) ), + this,SLOT( onSelectionExtend( const int,const int ) ) ); + QObject::connect(gui,SIGNAL( selectionEnd( const bool ) ), + this,SLOT( setSelection( const bool ) ) ); + QObject::connect(gui,SIGNAL( selectionCleared() ), + this,SLOT( clearSelection() ) ); } @@ -199,3 +199,3 @@ void EmulationLayer::onRcvChar(int c) case '\r' : scr->Return(); break; - case 0x07 : gui->Bell(); break; + case 0x07 : gui->bell(); break; default : scr->ShowCharacter(c); break; @@ -305,3 +305,3 @@ void EmulationLayer::showBulk() { - Character* image = scr->getCookedImage(); // get the image + QArray<Character> image = scr->getCookedImage(); // get the image gui->setImage(image, @@ -309,3 +309,3 @@ void EmulationLayer::showBulk() scr->getColumns()); // actual refresh - free(image); + delete image; //FIXME: check that we do not trigger other draw event here. @@ -322,3 +322,3 @@ void EmulationLayer::bulkEnd() { - if ( bulk_nlcnt > gui->Lines() || bulk_incnt > 20 ) + if ( bulk_nlcnt > gui->lines() || bulk_incnt > 20 ) showBulk(); // resets bulk_??cnt to 0, too. @@ -333,3 +333,3 @@ void EmulationLayer::setConnect(bool c) { - onImageSizeChange(gui->Lines(), gui->Columns()); + onImageSizeChange(gui->lines(), gui->columns()); showBulk(); |